Skip to content

Commit e968b29

Browse files
committed
Backwards compatibility
added an ImportError check to maintain backwards compatibility
1 parent 1e45f20 commit e968b29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

singleton_models/admin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ def has_delete_permission(self, request, obj=None):
1818
return False
1919

2020
def get_urls(self):
21-
from django.conf.urls import patterns, url
21+
try:
22+
from django.conf.urls.defaults import patterns, url
23+
except ImportError:
24+
from django.conf.urls import patterns, url
2225

2326
def wrap(view):
2427
def wrapper(*args, **kwargs):

0 commit comments

Comments
 (0)