Parcourir la source

Merge branch 'dev' into feature/relayout

Denis K il y a 8 ans
Parent
commit
ff04252e60
4 fichiers modifiés avec 7 ajouts et 4 suppressions
  1. 2 1
      jet/dashboard/urls.py
  2. 1 1
      jet/templatetags/jet_tags.py
  3. 2 1
      jet/tests/urls.py
  4. 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)

+ 1 - 1
jet/templatetags/jet_tags.py

@@ -224,7 +224,7 @@ def select2_lookups(field):
         qs = field.field.queryset
         model = qs.model
 
-        if getattr(model, 'autocomplete_search_fields', None):
+        if getattr(model, 'autocomplete_search_fields', None) and getattr(field.field, 'autocomplete', True):
             choices = []
             app_label = model._meta.app_label
             model_name = model._meta.object_name

+ 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)