diff options
author | 2012-12-22 20:32:58 +0100 | |
---|---|---|
committer | 2012-12-22 20:32:58 +0100 | |
commit | 6e0413b2e036b8fff997bcd1d6017681cdd91cfd (patch) | |
tree | 351eb28c2ab192785d19d4eb18166f42b9eae3d6 /module/web/pyload_app.py | |
parent | updated header, more responsive for smaller width (diff) | |
download | pyload-6e0413b2e036b8fff997bcd1d6017681cdd91cfd.tar.xz |
improved modal dialogs, added one for link grabber
Diffstat (limited to 'module/web/pyload_app.py')
-rw-r--r-- | module/web/pyload_app.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 147c31a92..e6c8300a2 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -20,6 +20,7 @@ import time from os.path import join from bottle import route, static_file, request, response, redirect, HTTPError, error +from jinja2 import TemplateNotFound from webinterface import PYLOAD, PROJECT_DIR, SETUP, env @@ -89,7 +90,11 @@ def serve_template(path): """ Serve backbone templates """ args = path.split("/") args.insert(1, "backbone") - return static_file("/".join(args), root=join(PROJECT_DIR, "templates")) + try: + return render_to_response("/".join(args)) + except TemplateNotFound, e: + print e + return HTTPError(404, "Not Found") @route('/favicon.ico') def favicon(): |