From b71ae96310f38a6325454522474618c9a30a8da6 Mon Sep 17 00:00:00 2001 From: Alban Date: Sun, 8 Mar 2026 13:25:06 +0100 Subject: [PATCH] Nouvelle version du dimanche --- app.py | 3 ++- mots_de_passe_identifiants.txt | 2 ++ repertoire_web.py | 15 ++++++++++++++- templates/NOTES.html | 28 ++++++++++++++++++++------- templates/index.html | 35 ++++++++++++++++++++++++++++++++-- 5 files changed, 72 insertions(+), 11 deletions(-) diff --git a/app.py b/app.py index 9ec60b9..40935a9 100644 --- a/app.py +++ b/app.py @@ -7,7 +7,8 @@ app = Flask(__name__) # crée l'application Flask @app.route("/") # URL racine : http://localhost:5000/ def index(): - return render_template("index.html", Identifiant="Alban") + return render_template("user_search.html", display= "none") + #return render_template("index.html", Identifiant="Alban") @app.route("/index2/") # URL racine : http://localhost:5000/ def index2(Identifiant): diff --git a/mots_de_passe_identifiants.txt b/mots_de_passe_identifiants.txt index b07ce51..cf107b6 100644 --- a/mots_de_passe_identifiants.txt +++ b/mots_de_passe_identifiants.txt @@ -21,3 +21,5 @@ bleurj;;gh bleurj;;gh bleurj;;gh zebi;;2 +tebi;;kk +tebi;;kk diff --git a/repertoire_web.py b/repertoire_web.py index 6be8143..2f64760 100644 --- a/repertoire_web.py +++ b/repertoire_web.py @@ -5,10 +5,23 @@ _repertoire = { "Bob": "0600000002" } +def lecture(): + with open('repertoire.txt','r') as f: + for ligne in f: + ligne = ligne.replace("\n","") + nom,numero=list(ligne.split(";;")) + _repertoire[nom]=numero + return _repertoire + + def rechercher(nom: str) -> str: """Renvoie le numéro si le nom existe, sinon 'Inconnu'.""" return _repertoire.get(nom, "Inconnu") def ajouter(nom: str, numero: str) -> None: """Ajoute ou remplace une entrée du répertoire.""" - _repertoire[nom] = numero + with open('repertoire.txt','a') as f : + f.write(nom) + f.write(';;') + f.write(numero) + f.write("\n") diff --git a/templates/NOTES.html b/templates/NOTES.html index a224c2a..db866c9 100644 --- a/templates/NOTES.html +++ b/templates/NOTES.html @@ -4,26 +4,40 @@ NOTES +

NOTES

Jeux favoris

#1.RIVALS

- Logo Rivals + Logo Rivals - - + + - - + +

favorite main weapon: SNIPER

favorite secondary: daggers

favorite main weapon: SNIPER

favorite secondary: daggers

favorite mele: schyte/katana

favorite utility: war horn/satchels

favorite mele: schyte/katana

favorite utility: war horn/satchels

#2.The Strongest Battlegrounds

- Logo TSB + Logo TSB

Phonk favoris

@@ -39,7 +53,7 @@
-

Retour à l'accueil

+

Retour à l'accueil

Verifier l'heure

Aller au formulaire

diff --git a/templates/index.html b/templates/index.html index 5364404..39d7403 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,7 +1,6 @@ - Logo Accueil + + Logo +
+

Mon site journal

Accueil

Aller sur NOTES

@@ -25,6 +52,8 @@
  • Rechercher un numéro
  • Ajouter un contact
  • +
    +
    {% if Identifiant == "Alban" %}

    Ajouter un utilisateur

    @@ -34,5 +63,7 @@
    {% endif %}

    Se connecter avec un autre identifiant

    +
    +
    - \ No newline at end of file +