This answers Boost Weblate Plugin Refactor — Plan (§ URL registration): Weblate’s urls.py does not auto-discover URLconfs from arbitrary INSTALLED_APPS entries; the plugin must attach routes explicitly.
Read boost-weblate/weblate/urls.py (same layout as upstream weblate/urls.py):
- Single hand-built list. Routes are collected in
real_patterns, starting with concretepath(...)entries—not Django’s per-appurls.pyautoload.
real_patterns = [
path("", weblate.trans.views.dashboard.home, name="home"),
path("projects/", weblate.trans.views.basic.list_projects, name="projects"),- Optional apps only by name. Extra routes appear when
urls.pyexplicitly checks for known dotted apps insettings.INSTALLED_APPS, then mutatesreal_patterns(same file; examples include legal, git export, SAML—eachif "…" in settings.INSTALLED_APPS:followed byreal_patterns +=/append).
if "weblate.legal" in settings.INSTALLED_APPS:
real_patterns.extend(
(
path(
"legal/",
include(("weblate.legal.urls", "weblate.legal"), namespace="legal"),- Final URLconf. Either
urlpatterns = real_patternsor, whenURL_PREFIXis set, a wrapperinclude(real_patterns)—still no generic scan of your plugin package.
# Handle URL prefix configuration
if not URL_PREFIX:
urlpatterns = real_patterns
else:
urlpatterns = [path(URL_PREFIX, include(real_patterns))]Conclusion: Putting boost_weblate.endpoint in INSTALLED_APPS does not register HTTP routes by itself. The plan’s two supported approaches are:
AppConfig.ready()— at startup, extend Weblate’s pattern list (this repo appends toweblate.urls.real_patternsinsrc/boost_weblate/endpoint/apps.py), orROOT_URLCONFinboost_weblate/settings_override.py(copied to/app/data/settings-override.pyin Docker) — a custom root URLconf that includes Weblate’s patterns and adds the plugin’sinclude().