1 from flask import Flask
2 from flask import render_template
3 from flask import request
4 from flask import abort, redirect, url_for
6 from flask import send_from_directory
8 from logging import Formatter
10 from flask.ext.babel import gettext
11 from flask.ext.babel import Babel
16 #@babel.localeselector
18 # return "en" #request.accept_languages.best_match(LANGUAGES.keys())
23 return render_template("index.html")
25 @app.route("/competition")
27 return render_template("competition.html", act="competition")
31 return render_template("task.html", act="task")
33 @app.route("/submission")
35 return render_template("submission.html", act="submission")
37 @app.route("/coursematerial")
39 return render_template("coursematerial.html", act="coursematerial")
41 @app.route("/impressum")
43 return render_template("impressum.html")
45 @app.route("/datenschutz")
47 return render_template("datenschutzerklaerung.html")
49 @app.errorhandler(404)
50 def page_not_found(e):
51 return render_template("404.html"), 404
53 if __name__ == "__main__":
54 app.run(host='localhost', port=5018, debug=False)