Spaces:
Sleeping
Sleeping
import os | |
class Config: | |
SECRET_KEY = os.getenv("SECRET_KEY", "changeme") # Utilise une variable d'environnement, avec une valeur par défaut à changer | |
SQLALCHEMY_DATABASE_URI =os.getenv("DATABASE_URL") | |
SQLALCHEMY_TRACK_MODIFICATIONS = False | |
SQLALCHEMY_ENGINE_OPTIONS = { | |
# Recycle connections after 280 seconds (less than potential 5-min server timeout) | |
'pool_recycle': 280, | |
# Optionally, enable pre-ping for extra robustness (recommended) | |
'pool_pre_ping': True | |
} | |
FLASK_ADMIN_SWATCH = 'cerulean' # Optionnel, permet de changer le style facilement | |