From: philipp Date: Thu, 27 Jul 2017 22:01:19 +0000 (+0000) Subject: URLs from index page work now. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wradmin.git/commitdiff_plain/74b9844d14da11dfd0bdedfe08d3693d88d05fd1 URLs from index page work now. git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2674 7aebc617-e5e2-0310-91dc-80fb5f6d2477 --- diff --git a/wradmin/__init__.py b/wradmin/__init__.py index 0c046f4..f61da7b 100644 --- a/wradmin/__init__.py +++ b/wradmin/__init__.py @@ -28,15 +28,25 @@ def close_db(error): @app.route("/") -def hello(): +def index(): return render_genshi_template('index.html') -@app.route("/rodelbahn/") +@app.route("/rodelbahn/list") def rodelbahn_list(): pass -@app.route("/bericht/") +@app.route("/bericht/list") def bericht_list(): pass + + +@app.route("/gasthaus/list") +def gasthaus_list(): + pass + + +@app.route("/coordtool/index") +def coordtool_index(): + pass diff --git a/wradmin/genshi.py b/wradmin/genshi.py index 63a510a..5267e7b 100644 --- a/wradmin/genshi.py +++ b/wradmin/genshi.py @@ -8,7 +8,10 @@ class PylonsHelper: if filename is not None and filename.startswith('/'): filename = filename[1:] return url_for('static', filename=filename) - return '' + if controller == 'rodelbahn': + if action == 'index': + return url_for('index') + return url_for('{}_{}'.format(controller, action)) def wiki(self, page_title=None): """Creates a link to the specified page in the www.winterrodeln.org wiki"""