diff options
| author | Tim Graham <timograham@gmail.com> | 2014-04-01 20:46:34 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-04-03 07:28:10 -0400 |
| commit | d73d0e071c1b4c86d57994a0ab55a74cfe80cdf5 (patch) | |
| tree | f36eebaf1cdd8bd07503b3a538e7d875ff8d29b4 /tests/admin_custom_urls/models.py | |
| parent | e6ced2bb086396b57601d04ad5b3ba347d1eb785 (diff) | |
Fixed #22218 -- Deprecated django.conf.urls.patterns.
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
Diffstat (limited to 'tests/admin_custom_urls/models.py')
| -rw-r--r-- | tests/admin_custom_urls/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/admin_custom_urls/models.py b/tests/admin_custom_urls/models.py index 121e03b860..51725d4253 100644 --- a/tests/admin_custom_urls/models.py +++ b/tests/admin_custom_urls/models.py @@ -35,7 +35,7 @@ class ActionAdmin(admin.ModelAdmin): def get_urls(self): # Add the URL of our custom 'add_view' view to the front of the URLs # list. Remove the existing one(s) first - from django.conf.urls import patterns, url + from django.conf.urls import url def wrap(view): def wrapper(*args, **kwargs): @@ -46,9 +46,9 @@ class ActionAdmin(admin.ModelAdmin): view_name = '%s_%s_add' % info - return patterns('', + return [ url(r'^!add/$', wrap(self.add_view), name=view_name), - ) + self.remove_url(view_name) + ] + self.remove_url(view_name) class Person(models.Model): |
