From e9bde725f81dd94d52b317f89c067118cab909be Mon Sep 17 00:00:00 2001 From: tedoaba Date: Mon, 28 Oct 2024 15:44:57 +0300 Subject: [PATCH] debug --- app/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/__init__.py b/app/__init__.py index c382686..6dc241a 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -42,5 +42,11 @@ def create_app(): # Print environment information for debugging print(f"Current Environment: {os.getenv('ENVIRONMENT')}") print(f"Using Database: {app.config.get('SQLALCHEMY_DATABASE_URI')}") + + if os.getenv('ENVIRONMENT') == 'Production': + app.config['DEBUG'] = False + else: + app.config['DEBUG'] = True + return app