Problem
settings_override.py appended to INSTALLED_APPS unconditionally. When the override module was sourced more than once in the same process (common with Django test runners, management commands that re-import --settings, or gunicorn preload+fork), the endpoint app config was registered multiple times. That could raise RuntimeError: Conflicting app_label on startup, or silently double-register AppConfig.ready() side effects such as duplicate URL hooks.
Acceptance Criteria
Implementation Notes
- Guard only the exact app config path the override appends (
boost_weblate.endpoint.apps.BoostEndpointConfig); deduping WEBLATE_ADD_APPS + settings_override.py double-registration is out of scope.
- Preserve existing list in-place
+= vs tuple rebind via globals() semantics for Docker exec() namespaces.
- The
ready() regression test runs in a subprocess because the main pytest session already calls django.setup() once.
References
src/boost_weblate/settings_override.py
tests/test_settings_override.py
Problem
settings_override.pyappended toINSTALLED_APPSunconditionally. When the override module was sourced more than once in the same process (common with Django test runners, management commands that re-import--settings, or gunicorn preload+fork), the endpoint app config was registered multiple times. That could raiseRuntimeError: Conflicting app_labelon startup, or silently double-registerAppConfig.ready()side effects such as duplicate URL hooks.Acceptance Criteria
settings_override.pyguards theINSTALLED_APPSappend with an_ENDPOINT_APP_CONFIG not in _INSTALLED_APPScheckINSTALLED_APPS(list and tuple namespaces)BoostEndpointConfig.ready()is not invoked twice after doubleexec()anddjango.setup()Implementation Notes
boost_weblate.endpoint.apps.BoostEndpointConfig); dedupingWEBLATE_ADD_APPS+settings_override.pydouble-registration is out of scope.+=vs tuple rebind viaglobals()semantics for Dockerexec()namespaces.ready()regression test runs in a subprocess because the main pytest session already callsdjango.setup()once.References
src/boost_weblate/settings_override.pytests/test_settings_override.py