Ajout d'une catégorie jeux dans le tryouts, chacun des jeux offre des rôles différents pour les membres d'équipes. Remodelage du code un peu et ajout de docu

This commit is contained in:
cedrick2711
2026-07-15 21:27:18 -04:00
parent a129f218b6
commit 195f3ce312
29 changed files with 1501 additions and 269 deletions
+24 -1
View File
@@ -3,14 +3,37 @@ from flask_login import LoginManager
from flask_wtf.csrf import CSRFProtect
from werkzeug.security import generate_password_hash, check_password_hash
# Database and extension initialization
db = SQLAlchemy()
login_manager = LoginManager()
login_manager.login_view = 'auth.login'
login_manager.login_message_category = 'info'
csrf = CSRFProtect()
def hash_password(password):
"""
Hash a plain text password using werkzeug's security functions.
Args:
password (str): The plain text password to hash.
Returns:
str: The hashed password string.
"""
return generate_password_hash(password)
def check_password(password_hash, password):
return check_password_hash(password_hash, password)
"""
Verify a password against its hash.
Args:
password_hash (str): The stored password hash.
password (str): The plain text password to verify.
Returns:
bool: True if the password matches the hash, False otherwise.
"""
return check_password_hash(password_hash, password)