Compare commits

...

2 Commits

Author SHA1 Message Date
50533eda26 docs: update readme 2025-11-11 05:03:36 +01:00
a14959aa58 fix: drop FLASK_DEBUG in production detection logic 2025-11-11 05:03:32 +01:00
2 changed files with 4 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ pip install -r requirements.txt
# 3. Set environment variables for Flask
export FLASK_APP=flado.app:create_app
export FLASK_DEBUG=1
export FLASK_ENV=development
# 4. Initialize the SQLite database (instance/flado.sqlite by default)
flask db init
@@ -42,7 +42,7 @@ The SQLite database file is stored in the `instance/` directory (it remains outs
Environment variables can tweak runtime behavior:
- `FLASK_DEBUG`: Set to `1`, `true`, `yes` to enable debug mode (development mode). When not set or set to any other value, production mode is enabled.
- `FLASK_ENV`: Set to `development` or `production`.
- `FLADO_DATABASE_URI`: Override the default SQLite path (`sqlite:///instance/flado.sqlite`).
- `FLADO_SECRET_KEY`: Provide a secret key for session cookies.
- `FLADO_THEME`: Switch between built-in themes such as `light`, `dark`, or `auto`.

View File

@@ -15,8 +15,8 @@ from .models import db
load_dotenv()
# Determine if we're in production
_is_production = os.getenv(
'FLASK_DEBUG', '').lower() not in ('1', 'true', 'yes')
FLASK_ENV = os.getenv('FLASK_ENV', 'development').lower()
_is_production = FLASK_ENV == 'production'
def setup_logging(app: Flask) -> None: