Files
TimeTracker/app/models
Dries Peeters 50f9bbbbae feat: implement configuration priority system (WebUI > .env > defaults)
Implement a configuration management system where settings changed via
WebUI take priority over .env values, while .env values are used as initial
startup values.

Changes:
- Update ConfigManager.get_setting() to check Settings model first, then
  environment variables, ensuring WebUI changes have highest priority
- Add Settings._initialize_from_env() method to initialize new Settings
  instances from .env file values on first creation
- Update Settings.get_settings() to automatically initialize from .env
  when creating a new Settings instance
- Add Settings initialization in create_app() to ensure .env values are
  loaded on application startup
- Add comprehensive test suite (test_config_priority.py) covering:
  * Settings priority over environment variables
  * .env values used as initial startup values
  * WebUI changes persisting and taking priority
  * Proper type handling for different setting types

This ensures that:
1. .env file values are used as initial configuration on first startup
2. Settings changed via WebUI are saved to database and take priority
3. Configuration priority order: Settings (DB) > .env > app config > defaults

Fixes configuration management workflow where users can set initial values
in .env but override them permanently via WebUI without modifying .env.
2025-11-28 16:19:03 +01:00
..
2025-11-13 10:09:28 +01:00
2025-11-01 09:04:06 +01:00
2025-10-24 17:08:42 +02:00
2025-10-31 18:33:02 +01:00
2025-11-13 11:27:48 +01:00
2025-10-24 15:03:34 +02:00