peter@1: from flask import Flask peter@1: from flask import render_template peter@1: from flask import request peter@1: from flask import abort, redirect, url_for peter@1: import os peter@1: from flask import send_from_directory peter@1: import logging peter@1: from logging import Formatter peter@1: peter@1: from flask.ext.babel import gettext peter@1: from flask.ext.babel import Babel peter@1: peter@1: app = Flask(__name__) pkoppatz@39: #babel = Babel(app) peter@1: pkoppatz@39: #@babel.localeselector pkoppatz@39: #def get_locale(): pkoppatz@39: # return "en" #request.accept_languages.best_match(LANGUAGES.keys()) peter@1: peter@1: @app.route("/") peter@1: @app.route("/index") peter@1: def index(): peter@3: return render_template("index.html") peter@1: peter@1: @app.route("/competition") peter@1: def competition(): peter@1: return render_template("competition.html", act="competition") peter@1: peter@1: @app.route("/task") peter@1: def task(): peter@1: return render_template("task.html", act="task") peter@1: peter@1: @app.route("/submission") peter@1: def submission(): peter@1: return render_template("submission.html", act="submission") peter@1: peter@1: @app.route("/coursematerial") peter@1: def coursematerial(): peter@1: return render_template("coursematerial.html", act="coursematerial") peter@1: peter@34: @app.route("/impressum") peter@34: def impressum(): peter@34: return render_template("impressum.html") peter@34: rb@47: @app.route("/datenschutzerklaerung") peter@36: def datenschutz(): peter@36: return render_template("datenschutzerklaerung.html") peter@36: peter@1: @app.errorhandler(404) peter@1: def page_not_found(e): peter@1: return render_template("404.html"), 404 peter@1: peter@1: if __name__ == "__main__": pkoppatz@39: app.run(host='localhost', port=5018, debug=False) peter@1: peter@1: