1. David Jean Louis
  2. django-admin-tools

Commits

Nathan Przybyszewski  committed 090babb

Fixed deprecation warning for django.conf.urls.default. (Deprecated in Django 1.4)

  • Participants
  • Parent commits 683e0f5
  • Branches default

Comments (0)

Files changed (3)

File admin_tools/dashboard/urls.py

View file
-from django.conf.urls.defaults import patterns, url
+try:
+    from django.conf.urls import patterns, url
+except ImportError: # django < 1.4
+    from django.conf.urls.defaults import patterns, url
 
 urlpatterns = patterns('admin_tools.dashboard.views',
     url(r'^set_preferences/(?P<dashboard_id>.+)/$', 'set_preferences', name='admin-tools-dashboard-set-preferences'),

File admin_tools/menu/urls.py

View file
-from django.conf.urls.defaults import patterns, url
+try:
+    from django.conf.urls import patterns, url
+except ImportError: # django < 1.4
+    from django.conf.urls.defaults import patterns, url
 
 urlpatterns = patterns('admin_tools.menu.views',
     url(r'^add_bookmark/$', 'add_bookmark', name='admin-tools-menu-add-bookmark'),

File admin_tools/urls.py

View file
 from django.conf import settings
-from django.conf.urls.defaults import patterns, url, include
+try:
+    from django.conf.urls import patterns, url, include
+except ImportError: # django < 1.4
+    from django.conf.urls.defaults import patterns, url, include
 
 urls = []
 if 'admin_tools.menu' in settings.INSTALLED_APPS: