Skip to content

Commit 4a7a4b4

Browse files
committed
fix(tests): fix deprecated imports for Django <1.6
This fixes an import that breaks in older versions of Django. It's just the 'django.conf.urls.defaults' import that was deprecated and removed in Django 1.6.
1 parent 47f7bdb commit 4a7a4b4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/urls.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
from django.conf.urls import (patterns, url, include, # noqa
2-
handler500, handler404)
1+
try:
2+
from django.conf.urls import (patterns, include, url,
3+
handler500, handler404)
4+
except ImportError:
5+
from django.conf.urls.defaults import (patterns, include, url, # noqa
6+
handler500, handler404)
37
from djcelery.views import apply
48

59
# Uncomment the next two lines to enable the admin:

0 commit comments

Comments
 (0)