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_views/customadmin.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_views/customadmin.py')
| -rw-r--r-- | tests/admin_views/customadmin.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/admin_views/customadmin.py b/tests/admin_views/customadmin.py index 560b4409c2..906fb871db 100644 --- a/tests/admin_views/customadmin.py +++ b/tests/admin_views/customadmin.py @@ -3,7 +3,7 @@ A second, custom AdminSite -- see tests.CustomAdminSiteTests. """ from __future__ import unicode_literals -from django.conf.urls import patterns +from django.conf.urls import url from django.contrib import admin from django.http import HttpResponse from django.contrib.auth.models import User @@ -26,9 +26,9 @@ class Admin2(admin.AdminSite): return super(Admin2, self).index(request, {'foo': '*bar*'}) def get_urls(self): - return patterns('', - (r'^my_view/$', self.admin_view(self.my_view)), - ) + super(Admin2, self).get_urls() + return [ + url(r'^my_view/$', self.admin_view(self.my_view)), + ] + super(Admin2, self).get_urls() def my_view(self, request): return HttpResponse("Django is a magical pony!") |
