diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-06 12:56:32 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-06 12:56:32 +0100 |
commit | 2cb61c7c17138c9144a3b66e5c1689c4f8f3560f (patch) | |
tree | c59fadd6fdb8431dcd2a131564990fe15408e655 /module/web/webinterface.py | |
parent | some fixes (diff) | |
download | pyload-2cb61c7c17138c9144a3b66e5c1689c4f8f3560f.tar.xz |
closed #231
Diffstat (limited to 'module/web/webinterface.py')
-rw-r--r-- | module/web/webinterface.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/module/web/webinterface.py b/module/web/webinterface.py index ea649c835..dd5920486 100644 --- a/module/web/webinterface.py +++ b/module/web/webinterface.py @@ -33,7 +33,7 @@ from module import InitHomeDir import bottle from bottle import run, app -from jinja2 import Environment, FileSystemLoader, FileSystemBytecodeCache +from jinja2 import Environment, FileSystemLoader, PrefixLoader, FileSystemBytecodeCache from middlewares import StripPathMiddleware, GZipMiddleWare try: @@ -89,7 +89,10 @@ if not exists(join("tmp", "jinja_cache")): makedirs(join("tmp", "jinja_cache")) bcc = FileSystemBytecodeCache(join("tmp","jinja_cache")) -env = Environment(loader=FileSystemLoader(join(PROJECT_DIR, "templates", "jinja")), extensions=['jinja2.ext.i18n'], trim_blocks=True, auto_reload=False, bytecode_cache=bcc) +loader = PrefixLoader({ + "default": FileSystemLoader(join(PROJECT_DIR, "templates", "jinja", "default")) + }) +env = Environment(loader=loader, extensions=['jinja2.ext.i18n'], trim_blocks=True, auto_reload=False, bytecode_cache=bcc) from filters import quotepath, path_make_relative, path_make_absolute, truncate,date |