Mise en place d'un système permettant de transmettre l'utilisateur logué de page en page
This commit is contained in:
Binary file not shown.
Binary file not shown.
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")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<h2>#2.The Strongest Battlegrounds</h2>
|
||||
<img src="{{ url_for('static', filename='img/tSB_logo.jpg') }}" alt="Logo TSB" width="200">
|
||||
<img src="{{ url_for('static', filename='img/TSB_logo.jpg') }}" alt="Logo TSB" width="200">
|
||||
<h2>Phonk favoris</h2>
|
||||
<table>
|
||||
<tbody>
|
||||
@@ -40,7 +40,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<p><a href="{{ url_for('index') }}">Retour à l'accueil</a></p>
|
||||
<p><a href="{{ url_for('heure') }}">Verifier l'heure</a></p>
|
||||
<p><a href="{{ url_for('heure',Identifiant=Identifiant) }}">Verifier l'heure</a></p>
|
||||
<p><a href="{{ url_for('formulaire') }}">Aller au formulaire</a></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,6 +8,6 @@
|
||||
<body>
|
||||
<h1>Page dynamique</h1>
|
||||
<p>Il est {{ h }} h {{ m }} min {{ s }} s</p>
|
||||
<p><a href="{{ url_for('index') }}">Retour</a></p>
|
||||
<p><a href="{{ url_for('index2', Identifiant=Identifiant) }}">Retour</a></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,8 +17,8 @@
|
||||
<body>
|
||||
<h1>Mon site journal</h1>
|
||||
<h2>Accueil</h2>
|
||||
<p><a href="{{ url_for('NOTES') }}">Aller sur NOTES</a></p>
|
||||
<p><a href="{{ url_for('heure') }}">Verifier l'heure</a></p>
|
||||
<p><a href="{{ url_for('NOTES',Identifiant=Identifiant) }}">Aller sur NOTES</a></p>
|
||||
<p><a href="{{ url_for('heure',Identifiant=Identifiant) }}">Verifier l'heure</a></p>
|
||||
<p><a href="{{ url_for('formulaire') }}">Aller au formulaire</a></p>
|
||||
<h3>Répertoire</h3>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user