Always load the .env file

If the app is run in another way than `python app.py`, the environment file will not be loaded.
This commit is contained in:
Laurent FAVOLE 2025-01-27 12:35:53 +01:00
parent ca9e820552
commit 2111a2050c
No known key found for this signature in database
GPG key ID: 582FD3B4DA470A07

4
app.py
View file

@ -7,7 +7,9 @@ from datetime import datetime, timedelta
# IMPORT DES MODULES
from modules.Classes import *
# On charge les variables d'environnement par défaut pour avoir la liste des cinémas
# On charge les variables d'environnement...
dotenv.load_dotenv(".env")
# et celles par défaut pour avoir la liste des cinémas
dotenv.load_dotenv(".env.sample")
WEBSITE_TITLE = os.environ.get("WEBSITE_TITLE", "GrainParisArt")