Commits

Gustavo Picon committed 66f27a3

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

Comments (0)

Files changed (1)

treebeard/admin.py

 
 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
+else:
+    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