Skip to content

Commit b9c86fd

Browse files
committed
Remove deprecated use of patterns
Fix #15 and #16
1 parent c6bfe24 commit b9c86fd

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

debug_panel/urls.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
These should not be loaded explicitly; It is used internally by the
55
debug-panel application.
66
"""
7+
from .views import debug_data
8+
79
try:
8-
from django.conf.urls import patterns, url
10+
from django.conf.urls import url
911
except ImportError: # django < 1.4
10-
from django.conf.urls.defaults import patterns, url
12+
from django.conf.urls.defaults import url
1113

1214
_PREFIX = '__debug__'
1315

14-
urlpatterns = patterns('debug_panel.views',
15-
url(r'^%s/data/(?P<cache_key>\d+\.\d+)/$' % _PREFIX, 'debug_data', name='debug_data'),
16-
)
16+
urlpatterns = [
17+
url(r'^%s/data/(?P<cache_key>\d+\.\d+)/$' % _PREFIX, debug_data, name='debug_data'),
18+
]

tests/urls.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
from django.conf.urls import include, patterns, url
2-
3-
urlpatterns = patterns('',
4-
)
1+
urlpatterns = []

0 commit comments

Comments
 (0)