summaryrefslogtreecommitdiffstats
path: root/module/web/pyload_app.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-12-22 20:32:58 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-12-22 20:32:58 +0100
commit6e0413b2e036b8fff997bcd1d6017681cdd91cfd (patch)
tree351eb28c2ab192785d19d4eb18166f42b9eae3d6 /module/web/pyload_app.py
parentupdated header, more responsive for smaller width (diff)
downloadpyload-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.py7
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():