diff options
| author | Tim Graham <timograham@gmail.com> | 2018-12-07 17:52:28 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-12-31 10:47:32 -0500 |
| commit | 043bd709425149b8eff3fb821cba5c23aaebd0df (patch) | |
| tree | 7624be405a6a6e5a041e2852251ef76e9d28fa7d /tests/admin_views/customadmin.py | |
| parent | 1136d57f01ce3e3efab44163ccd7b3b34ec4207f (diff) | |
Updated test URL patterns to use path() and re_path().
Diffstat (limited to 'tests/admin_views/customadmin.py')
| -rw-r--r-- | tests/admin_views/customadmin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/admin_views/customadmin.py b/tests/admin_views/customadmin.py index 9331918b37..a9d8a060b9 100644 --- a/tests/admin_views/customadmin.py +++ b/tests/admin_views/customadmin.py @@ -1,11 +1,11 @@ """ A second, custom AdminSite -- see tests.CustomAdminSiteTests. """ -from django.conf.urls import url from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.http import HttpResponse +from django.urls import path from . import admin as base_admin, forms, models @@ -25,7 +25,7 @@ class Admin2(admin.AdminSite): def get_urls(self): return [ - url(r'^my_view/$', self.admin_view(self.my_view), name='my_view'), + path('my_view/', self.admin_view(self.my_view), name='my_view'), ] + super().get_urls() def my_view(self, request): |
