|
@@ -2,11 +2,10 @@ import django
|
|
|
from django.conf.urls import url
|
|
|
|
|
|
try:
|
|
|
- from django.views.i18n import javascript_catalog
|
|
|
- jsc_view = javascript_catalog
|
|
|
-except ImportError:
|
|
|
from django.views.i18n import JavaScriptCatalog
|
|
|
- jsc_view = JavaScriptCatalog.as_view()
|
|
|
+ javascript_catalog = JavaScriptCatalog.as_view()
|
|
|
+except ImportError: # Django < 2.0
|
|
|
+ from django.views.i18n import javascript_catalog
|
|
|
|
|
|
from jet.dashboard import dashboard
|
|
|
from jet.dashboard.views import update_dashboard_modules_view, add_user_dashboard_module_view, \
|
|
@@ -53,8 +52,8 @@ urlpatterns = [
|
|
|
),
|
|
|
url(
|
|
|
r'^jsi18n/$',
|
|
|
- jsc_view,
|
|
|
- {'packages': ('jet',)},
|
|
|
+ javascript_catalog,
|
|
|
+ {'packages': 'jet'},
|
|
|
name='jsi18n'
|
|
|
),
|
|
|
]
|