Mise en place d'un système permettant de transmettre l'utilisateur logué de page en page
This commit is contained in:
19
app.py
19
app.py
@@ -7,9 +7,13 @@ app = Flask(__name__) # crée l'application Flask
|
||||
|
||||
@app.route("/") # URL racine : http://localhost:5000/
|
||||
def index():
|
||||
return render_template("user_search.html",display = "none")
|
||||
return render_template("index.html", Identifiant="Alban")
|
||||
|
||||
@app.route("/index2/<Identifiant>") # URL racine : http://localhost:5000/
|
||||
def index2(Identifiant):
|
||||
return render_template("index.html", Identifiant=Identifiant)
|
||||
|
||||
|
||||
@app.route("/cherche")
|
||||
def cherche():
|
||||
return render_template("cherche.html")
|
||||
@@ -57,18 +61,19 @@ def result_search():
|
||||
else:
|
||||
return render_template("user_search.html", display="visible")
|
||||
|
||||
@app.route("/NOTES")
|
||||
def NOTES():
|
||||
return render_template("NOTES.html")
|
||||
@app.route("/NOTES/<Identifiant>")
|
||||
def NOTES(Identifiant):
|
||||
return render_template("NOTES.html", Identifiant=Identifiant)
|
||||
|
||||
@app.route("/heure")
|
||||
def heure():
|
||||
@app.route("/heure/<Identifiant>")
|
||||
def heure(Identifiant):
|
||||
maintenant = datetime.now()
|
||||
return render_template(
|
||||
"heure.html",
|
||||
h=maintenant.hour,
|
||||
m=maintenant.minute,
|
||||
s=maintenant.second
|
||||
s=maintenant.second,
|
||||
Identifiant=Identifiant,
|
||||
)
|
||||
|
||||
@app.route("/formulaire")
|
||||
|
||||
Reference in New Issue
Block a user