1. Gustavo Picon
  2. django-treebeard


Gustavo Picon  committed 66f27a3

Better handling of django's deprecation of django.conf.urls.defaults

  • Participants
  • Parent commits fd57de9
  • Branches default

Comments (0)

Files changed (1)

File treebeard/admin.py

View file
  • Ignore whitespace
 import sys
-from django.conf.urls import patterns, url
+from django import VERSION as DJANGO_VERSION
+if DJANGO_VERSION < (1, 4):
+    from django.conf.urls.defaults import patterns, url
+    from django.conf.urls import patterns, url
 from django.contrib import admin, messages
 from django.contrib.admin.views.main import ChangeList
 from django.http import HttpResponse, HttpResponseBadRequest