Browse Source

Fix django 1.10 import issue

Denis K 8 years ago
parent
commit
bfe054f796
3 changed files with 6 additions and 3 deletions
  1. 2 1
      jet/dashboard/urls.py
  2. 2 1
      jet/tests/urls.py
  3. 2 1
      jet/urls.py

+ 2 - 1
jet/dashboard/urls.py

@@ -1,5 +1,5 @@
 import django
-from django.conf.urls import patterns, url
+from django.conf.urls import url
 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,4 +53,5 @@ urlpatterns = [
 urlpatterns += dashboard.urls.get_urls()
 
 if django.VERSION[:2] < (1, 8):
+    from django.conf.urls import patterns
     urlpatterns = patterns('', *urlpatterns)

+ 2 - 1
jet/tests/urls.py

@@ -1,5 +1,5 @@
 import django
-from django.conf.urls import patterns, include, url
+from django.conf.urls import include, url
 from django.contrib import admin
 
 admin.autodiscover()
@@ -12,4 +12,5 @@ urlpatterns = [
 ]
 
 if django.VERSION[:2] < (1, 8):
+    from django.conf.urls import patterns
     urlpatterns = patterns('', *urlpatterns)

+ 2 - 1
jet/urls.py

@@ -1,5 +1,5 @@
 import django
-from django.conf.urls import patterns, url
+from django.conf.urls import url
 from django.views.i18n import javascript_catalog
 from jet.views import add_bookmark_view, remove_bookmark_view, toggle_application_pin_view, model_lookup_view
 
@@ -33,4 +33,5 @@ urlpatterns = [
 ]
 
 if django.VERSION[:2] < (1, 8):
+    from django.conf.urls import patterns
     urlpatterns = patterns('', *urlpatterns)