Skip to content

Commit

Permalink
Merge pull request #46 from Cuuuurzel/patch-1
Browse files Browse the repository at this point in the history
Fixed urls patterns usage warning in Django 1.9
  • Loading branch information
crccheck committed Jan 13, 2016
2 parents 4c3915d + 38a6e2b commit 22681a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django_object_actions/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from functools import wraps

from django.conf.urls import patterns, url
from django.conf.urls import url
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.db.models.query import QuerySet
Expand Down Expand Up @@ -31,13 +31,13 @@ def get_tool_urls(self, urls):

for tool in self.objectactions:
tools[tool] = getattr(self, tool)
my_urls = patterns('',
my_urls = [
# supports pks that are numbers or uuids
url(r'^(?P<pk>[0-9a-f\-]+)/tools/(?P<tool>\w+)/$',
self.admin_site.admin_view(
ModelToolsView.as_view(model=self.model, tools=tools, back=change_view)),
name=tools_view)
)
]
return my_urls

###################################
Expand Down

0 comments on commit 22681a8

Please sign in to comment.