diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-07-10 23:07:52 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-07-10 23:07:52 +0200 |
commit | fc4e71d7809e6e9975d678ee388fc28c74e0e3af (patch) | |
tree | ce9624f00ed5a8ab22781476ea1b8196bee53527 /pyload/web/pyload_app.py | |
parent | new hoster links, fixed manifest (diff) | |
download | pyload-fc4e71d7809e6e9975d678ee388fc28c74e0e3af.tar.xz |
several ui fixes
Diffstat (limited to 'pyload/web/pyload_app.py')
-rw-r--r-- | pyload/web/pyload_app.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pyload/web/pyload_app.py b/pyload/web/pyload_app.py index 3d3f297a8..2f6211621 100644 --- a/pyload/web/pyload_app.py +++ b/pyload/web/pyload_app.py @@ -19,9 +19,9 @@ import time from os.path import join -from bottle import route, static_file, response, redirect +from bottle import route, static_file, response, redirect, template -from webinterface import PROJECT_DIR, SETUP, APP_PATH, UNAVAILALBE +from webinterface import PYLOAD, PROJECT_DIR, SETUP, APP_PATH, UNAVAILALBE from utils import login_required @@ -32,6 +32,7 @@ def serve_icon(path): return redirect('/images/icon.png') # return static_file(path, root=join("tmp", "icons")) + @route("/download/:fid") @login_required('Download') def download(fid, api): @@ -48,8 +49,11 @@ def index(): # TODO show different page pass - # TODO: render it as simple template with configuration - return server_static('index.html') + f = server_static('index.html') + content = f.body.read() + f.body = template(content, ws=PYLOAD.getWSAddress(), web=PYLOAD.getConfigValue('webinterface', 'port')) + + return f # Very last route that is registered, could match all uris @route('/<path:path>') |