Problem
Beyond format handlers, the plugin may need to register custom URL endpoints with Weblate (e.g., a /boost-endpoint/ for webhook receivers or API extensions). Django's URL routing is typically configured at startup via ROOT_URLCONF, but a plugin can't modify that directly. Research is needed to determine the best approach — AppConfig.ready() monkey-patching, middleware injection, or Weblate's own addon URL hooks — and prototype the chosen solution.
Acceptance Criteria
Implementation Notes
- Check if Weblate's
Addon base class exposes a get_urls() or similar hook — this would be the cleanest path.
AppConfig.ready() is the standard Django plugin entrypoint. Modifying ROOT_URLCONF from there is possible but fragile — it runs before URL patterns are finalized, and Weblate may override it.
- Alternative: use Django middleware to intercept specific paths before they hit Weblate's URL resolver.
- This is research-heavy: allocate time for reading Weblate and Django source, not just coding. The prototype can be minimal (a single view returning
HttpResponse("ok")).
- Document findings even if the prototype doesn't fully work — this feeds into the 3-week horizon URL endpoint item.
References
- Related files:
README.md, src/boost_weblate/apps.py (AppConfig), src/boost_weblate/urls.py (prototype)
- Upstream: Django
AppConfig.ready() docs, Weblate Addon base class source, Weblate urls.py
Problem
Beyond format handlers, the plugin may need to register custom URL endpoints with Weblate (e.g., a
/boost-endpoint/for webhook receivers or API extensions). Django's URL routing is typically configured at startup viaROOT_URLCONF, but a plugin can't modify that directly. Research is needed to determine the best approach —AppConfig.ready()monkey-patching, middleware injection, or Weblate's own addon URL hooks — and prototype the chosen solution.Acceptance Criteria
AppConfig.ready()+ROOT_URLCONFoverride, (b) middleware-based URL injection, (c) Weblate addonget_urls()if availableREADME.mdwith rationale, limitations, and upgrade-safety analysis (will it break on Weblate version bumps?)Implementation Notes
Addonbase class exposes aget_urls()or similar hook — this would be the cleanest path.AppConfig.ready()is the standard Django plugin entrypoint. ModifyingROOT_URLCONFfrom there is possible but fragile — it runs before URL patterns are finalized, and Weblate may override it.HttpResponse("ok")).References
README.md,src/boost_weblate/apps.py(AppConfig),src/boost_weblate/urls.py(prototype)AppConfig.ready()docs, WeblateAddonbase class source, Weblateurls.py