pymove3d.py
changeset 1 3aa6f55df039
child 3 c07ffbab8647
equal deleted inserted replaced
0:46abfb767ff2 1:3aa6f55df039
       
     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", act="index")
       
    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.errorhandler(404)
       
    43 def page_not_found(e):
       
    44     return render_template("404.html"), 404
       
    45 
       
    46 if __name__ == "__main__":
       
    47     app.run(host='localhost', port=5014, debug=True)
       
    48 
       
    49 
Impressum Datenschutzerklärung