pymove3d.py
branchlanding-page-2014
changeset 39 6ce477e2df12
parent 36 b797d9ada684
child 47 ce3ed3647351
equal deleted inserted replaced
37:a24b150674bf 39:6ce477e2df12
     9 
     9 
    10 from flask.ext.babel import gettext
    10 from flask.ext.babel import gettext
    11 from flask.ext.babel import Babel
    11 from flask.ext.babel import Babel
    12 
    12 
    13 app = Flask(__name__)
    13 app = Flask(__name__)
    14 babel = Babel(app)
    14 #babel = Babel(app)
    15 
    15 
    16 @babel.localeselector
    16 #@babel.localeselector
    17 def get_locale():
    17 #def get_locale():
    18     return "en" #request.accept_languages.best_match(LANGUAGES.keys())
    18 #    return "en" #request.accept_languages.best_match(LANGUAGES.keys())
    19 
    19 
    20 @app.route("/")
    20 @app.route("/")
    21 
       
    22 @app.route("/index")
    21 @app.route("/index")
    23 def index():
    22 def index():
    24     return render_template("index.html")
    23     return render_template("index.html")
    25 
    24 
    26 @app.route("/competition")
    25 @app.route("/competition")
    50 @app.errorhandler(404)
    49 @app.errorhandler(404)
    51 def page_not_found(e):
    50 def page_not_found(e):
    52     return render_template("404.html"), 404
    51     return render_template("404.html"), 404
    53 
    52 
    54 if __name__ == "__main__":
    53 if __name__ == "__main__":
    55     app.run(host='localhost', port=5014, debug=True)
    54     app.run(host='localhost', port=5018, debug=False)
    56 
    55 
    57 
    56 
Impressum Datenschutzerklärung