changes to jinja2 templates; issue a warning if .env is not loaded

This commit is contained in:
Yusur 2025-06-14 13:20:16 +02:00
parent c56594345a
commit 8e12714026
4 changed files with 16 additions and 5 deletions

View file

@ -18,7 +18,8 @@ __version__ = '0.3.3'
APP_BASE_DIR = os.path.dirname(os.path.dirname(__file__))
dotenv.load_dotenv()
if not dotenv.load_dotenv():
warnings.warn('.env not loaded; application may break!', UserWarning)
app = Flask(__name__)
app.secret_key = os.getenv('SECRET_KEY')