pymove3d.py
author Reimar Bauer <rb.proj AT googlemail DOT com>
Fri, 03 Jan 2014 09:32:30 +0100
branchlanding-page-2014
changeset 66 9203f59f8707
parent 47 ce3ed3647351
permissions -rwxr-xr-x
deadline of competition added
     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 @app.route("/index")
    22 def index():
    23     return render_template("index.html")
    24 
    25 @app.route("/competition")
    26 def competition():
    27     return render_template("competition.html", act="competition")
    28 
    29 @app.route("/task")
    30 def task():
    31     return render_template("task.html", act="task")
    32 
    33 @app.route("/submission")
    34 def submission():
    35     return render_template("submission.html", act="submission")
    36 
    37 @app.route("/coursematerial")
    38 def coursematerial():
    39     return render_template("coursematerial.html", act="coursematerial")
    40 
    41 @app.route("/impressum")
    42 def impressum():
    43     return render_template("impressum.html")
    44 
    45 @app.route("/datenschutzerklaerung")
    46 def datenschutz():
    47     return render_template("datenschutzerklaerung.html")
    48 
    49 @app.errorhandler(404)
    50 def page_not_found(e):
    51     return render_template("404.html"), 404
    52 
    53 if __name__ == "__main__":
    54     app.run(host='localhost', port=5018, debug=False)
    55 
    56 
Impressum Datenschutzerklärung