erstmal hallo an alle

Ich hab ein kleines Problem mit bottles TEMPLATE_PATH.
Die version von bottle ist 0.64
die Ordnerstructur sieht so aus:
/pfad/zum/bottle/root/bottle.py
/pfad/zum/bottle/root/site.py
/pfad/zum/bottle/root/models.py
/pfad/zum/bottle/root/admin/site.py
/pfad/zum/bottle/root/admin/settings.py
/pfad/zum/bottle/root/admin/views
in views sollen die templates für den admin liegen,
trotz hin und her kann ich bottle allerdings nicht dazu bewegen,
davon welche zu finden.
der fehler des servers lautet:
Code: Alles auswählen
Unhandled Exception: IOError(2, 'No such file or directory')
localhost - - [19/Apr/2010 15:48:40] "GET /admin HTTP/1.1" 500 395
^CShutting Down...
Code: Alles auswählen
from bottle import route, run
from models import Test
from admin.site import setup_route
setup_route('/admin')
run()
Code: Alles auswählen
from elixir import Entity, Field, Unicode, UnicodeText
from admin.site import register
class Test(Entity):
test_name = Field(Unicode(30))
test_text = Field(UnicodeText)
def __unicode__(self):
return self.test_name
register(Test)
Code: Alles auswählen
import bottle
from bottle import route
from bottle import jinja2_view as view
import settings
SUPPORTED_DATABASES = ["sqlite"]
def _connect_db():
metadata.bind = settings.DATABASE_ENGINE + ":///" + settings.DATABASE_NAME
metadata.echo = settings.DEBUG
def _setup_db():
setup_all()
create_all()
def _add_template_path():
path = os.path.append(os.path.join("./", "admin/views/"))
bottle.TEMPLATE_PATH.insert(0, path)
print bottle.TEMPLATE_PATH
MODELS = []
def register(model):
if not model in MODELS:
MODELS.append(model)
def setup_route(base_route):
_connect_db()
_setup_db()
_add_template_path()
@route(base_route)
@view("overview.tpl")
def site():
return {"models": MODELS}
Code: Alles auswählen
DEBUG = True
DATABASE_ENGINE = "sqlite" # at time only sqlite is supported
DATABASE_NAME = "test.db" # the name of the db
vielleicht kann mir ja jemand auf die Sprünge helfen.
thx rope