зеркало из https://github.com/mozilla/kitsune.git
Add back wagtail_urls to the urls.py (#6230)
- This may be important for the localization work - Regardless, the addition is recommended by WT and is the common practice - Add WAGTAIL_ENABLE setting - Add check for enablement for urls - Add wagtail_urls if WAGTAIL_ENABLE=True
This commit is contained in:
Родитель
1919c0c979
Коммит
d33b05bd84
|
@ -1317,6 +1317,7 @@ MOZILLA_LOCATION_SERVICE = config(
|
|||
)
|
||||
|
||||
# Wagtail settings
|
||||
WAGTAIL_ENABLE = config("WAGTAIL_ENABLE", default=False, cast=bool)
|
||||
WAGTAIL_ENABLE_ADMIN = config("WAGTAIL_ENABLE_ADMIN", default=False, cast=bool)
|
||||
WAGTAIL_I18N_ENABLED = True
|
||||
WAGTAIL_CONTENT_LANGUAGES = LANGUAGES
|
||||
|
|
|
@ -6,6 +6,7 @@ from django.views.static import serve as servestatic
|
|||
from graphene_django.views import GraphQLView
|
||||
from waffle.decorators import waffle_flag
|
||||
from waffle.views import wafflejs
|
||||
from wagtail import urls as wagtail_urls
|
||||
from wagtail.admin.urls import urlpatterns as wagtail_admin_urlpatterns
|
||||
from wagtail.urls import serve_pattern
|
||||
from wagtail.utils.urlpatterns import decorate_urlpatterns
|
||||
|
@ -71,6 +72,9 @@ if settings.WAGTAIL_ENABLE_ADMIN:
|
|||
)
|
||||
)
|
||||
|
||||
if settings.WAGTAIL_ENABLE:
|
||||
urlpatterns += i18n_patterns(path("", include(wagtail_urls)))
|
||||
|
||||
urlpatterns += [
|
||||
path("1/", include("kitsune.inproduct.urls")),
|
||||
path("postcrash", include("kitsune.postcrash.urls")),
|
||||
|
|
Загрузка…
Ссылка в новой задаче