Mise en place d'un système permettant de transmettre l'utilisateur logué de page en page

This commit is contained in:
Alban
2026-03-03 17:50:51 +01:00
parent ce87beb55a
commit 5c8902f354
6 changed files with 22 additions and 17 deletions

19
app.py
View File

@@ -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")