You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've written https://github.com/mozilla/foundation.mozilla.org/blob/master/network-api/networkapi/wagtailcustomization/redirects/middleware.py as a wrapper around wagtail.contrib.redirects, so that setting a redirect for /somepage in the CMS will kick in for any /en/somepage, /fr/somepage, etc. etc, but it might be worth moving that into the wagtail-modeltranslation repo instead, with a docs update that explains to use 'wagtail_modeltranslation.middleware.RedirectMiddleware' rather than 'wagtail.contrib.redirects.middleware.RedirectMiddleware' in the MIDDLEWARE = [...] section of the Django settings.
If that sounds like a good idea, I can form a PR with the relevant code and docs changes.
The text was updated successfully, but these errors were encountered:
I've also filed #327 to see if it makes sense to move our solution into wagtail-modeltranslation instead (since it solves a problem that is a consequence of using wagtail-modeltranslation rather than some other localization solution)
I've written https://github.com/mozilla/foundation.mozilla.org/blob/master/network-api/networkapi/wagtailcustomization/redirects/middleware.py as a wrapper around wagtail.contrib.redirects, so that setting a redirect for
/somepage
in the CMS will kick in for any/en/somepage
,/fr/somepage
, etc. etc, but it might be worth moving that into the wagtail-modeltranslation repo instead, with a docs update that explains to use'wagtail_modeltranslation.middleware.RedirectMiddleware'
rather than'wagtail.contrib.redirects.middleware.RedirectMiddleware'
in theMIDDLEWARE = [...]
section of the Django settings.If that sounds like a good idea, I can form a PR with the relevant code and docs changes.
The text was updated successfully, but these errors were encountered: