pymove3d.py
author Peter Koppatz <peter@koppatz.com>
Wed, 11 Dec 2013 08:06:54 +0100
branchlanding-page-2014
changeset 36 b797d9ada684
parent 34 d9a3c0cebf6b
child 39 6ce477e2df12
permissions -rwxr-xr-x
Datenschutzerklarung
     1 from flask import Flask
     2 from flask import render_template
     3 from flask import request
     4 from flask import abort, redirect, url_for
     5 import os
     6 from flask import send_from_directory
     7 import logging
     8 from logging import Formatter
     9 
    10 from flask.ext.babel import gettext
    11 from flask.ext.babel import Babel
    12 
    13 app = Flask(__name__)
    14 babel = Babel(app)
    15 
    16 @babel.localeselector
    17 def get_locale():
    18     return "en" #request.accept_languages.best_match(LANGUAGES.keys())
    19 
    20 @app.route("/")
    21 
    22 @app.route("/index")
    23 def index():
    24     return render_template("index.html")
    25 
    26 @app.route("/competition")
    27 def competition():
    28     return render_template("competition.html", act="competition")
    29 
    30 @app.route("/task")
    31 def task():
    32     return render_template("task.html", act="task")
    33 
    34 @app.route("/submission")
    35 def submission():
    36     return render_template("submission.html", act="submission")
    37 
    38 @app.route("/coursematerial")
    39 def coursematerial():
    40     return render_template("coursematerial.html", act="coursematerial")
    41 
    42 @app.route("/impressum")
    43 def impressum():
    44     return render_template("impressum.html")
    45 
    46 @app.route("/datenschutz")
    47 def datenschutz():
    48     return render_template("datenschutzerklaerung.html")
    49 
    50 @app.errorhandler(404)
    51 def page_not_found(e):
    52     return render_template("404.html"), 404
    53 
    54 if __name__ == "__main__":
    55     app.run(host='localhost', port=5014, debug=True)
    56 
    57 
Impressum Datenschutzerklärung