# HG changeset patch # User Peter Koppatz # Date 1390041403 -3600 # Node ID bd4b675d92143c8fcd21159310fb02541522fcb3 # Parent 92d284f1a45766438a501169dfb06afc820d3222 negotiation set to standard value if none diff -r 92d284f1a457 -r bd4b675d9214 pymove3d.py --- a/pymove3d.py Sat Jan 18 11:01:11 2014 +0100 +++ b/pymove3d.py Sat Jan 18 11:36:43 2014 +0100 @@ -18,7 +18,8 @@ @babel.localeselector def get_locale(): - return request.accept_languages.best_match(LANGUAGES.keys()) + """ToDo: if translation is completed, switch to en """ + return request.accept_languages.best_match(LANGUAGES.keys()) or 'de' @app.route("/") @@ -45,12 +46,21 @@ @app.route("/imprint") def imprint(): - return render_template(get_locale () + "/imprint.html", act="imprint") + return render_template(get_locale() + "/imprint.html", act="imprint") @app.route("/privacy") def privacy(): return render_template(get_locale() + "/privacy.html", act="privacy") +@app.route(_("/competition-2013")) +def competition_2013(): + return render_template(get_locale() + "/archive/competitions/2013/comptetition_2013.html", + act="coursematerial") + +@app.route(_("/competition-2014")) +def competition_2014(): + return render_template(get_locale() + "archive/competitions/2014/competition_2014.html", + act="coursematerial") @app.errorhandler(404) def page_not_found(e):