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
18 return "en" #request.accept_languages.best_match(LANGUAGES.keys())
24 return render_template("index.html")
26 @app.route("/competition")
28 return render_template("competition.html", act="competition")
32 return render_template("task.html", act="task")
34 @app.route("/submission")
36 return render_template("submission.html", act="submission")
38 @app.route("/coursematerial")
40 return render_template("coursematerial.html", act="coursematerial")
42 @app.errorhandler(404)
43 def page_not_found(e):
44 return render_template("404.html"), 404
46 if __name__ == "__main__":
47 app.run(host='localhost', port=5014, debug=True)