from flask import Flask, request, session from flask import render_template, send_from_directory import os import sys from datetime import datetime sys.path.insert(0, os.path.dirname(__file__)) app = Flask(__name__) app.config.from_object("config") app.jinja_env.globals.update({ "year": datetime.now().year, "menuitems": [ ('/', '', 'accueil'), ('/grades/', 'Mes notes', ''), ('/timetable/', 'Emploi du temps', '') ] }) @app.route("/") def index(): return render_template("index.html") @app.route("/grades/") def grades(): return render_template("grades.html") @app.route("/timetable/") def timetable(): return render_template("timetable.html") @app.route('/favicon.ico') def favicon(): return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico',mimetype='image/vnd.microsoft.icon')