Skip to content

Commit 0b12fb3

Browse files
committed
update the way the url pattern is defined for future-proofin'
I thought I read that defining urls without url(...) was going away.
1 parent 3e7bb2a commit 0b12fb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_object_actions/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from functools import wraps
44

5-
from django.conf.urls import patterns
5+
from django.conf.urls import patterns, url
66
from django.contrib import messages
77
from django.db.models.query import QuerySet
88
from django.http import Http404, HttpResponse, HttpResponseRedirect
@@ -22,7 +22,7 @@ def get_tool_urls(self):
2222
tools[tool] = getattr(self, tool)
2323
my_urls = patterns('',
2424
# supports pks that are numbers or uuids
25-
(r'^(?P<pk>[0-9a-f\-]+)/tools/(?P<tool>\w+)/$',
25+
url(r'^(?P<pk>[0-9a-f\-]+)/tools/(?P<tool>\w+)/$',
2626
self.admin_site.admin_view(
2727
ModelToolsView.as_view(model=self.model, tools=tools)))
2828
)

0 commit comments

Comments
 (0)