summaryrefslogtreecommitdiff
path: root/tests/auth_tests
diff options
context:
space:
mode:
authorMarten Kenbeek <marten.knbk@gmail.com>2015-05-28 17:25:52 +0200
committerTim Graham <timograham@gmail.com>2015-06-08 15:12:20 -0400
commit1e82094f1b6690018228e688303295f83e1c3d9a (patch)
treea0e209da939ebe3b64e8e38cf47a191785825da0 /tests/auth_tests
parent39937de7e60052d3ffa9f07fdbb9262aced35d61 (diff)
downloaddjango-1e82094f1b6690018228e688303295f83e1c3d9a.tar.gz
Fixed #21927 -- Made application and instance namespaces more distinct.
Made URL application namespaces be set in the included URLconf and instance namespaces in the call to include(). Deprecated other ways to set application and instance namespaces.
Diffstat (limited to 'tests/auth_tests')
-rw-r--r--tests/auth_tests/urls.py4
-rw-r--r--tests/auth_tests/urls_admin.py4
-rw-r--r--tests/auth_tests/urls_custom_user_admin.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/auth_tests/urls.py b/tests/auth_tests/urls.py
index 3c4dc6b12b..2851b451e1 100644
--- a/tests/auth_tests/urls.py
+++ b/tests/auth_tests/urls.py
@@ -1,4 +1,4 @@
-from django.conf.urls import include, url
+from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth import views
from django.contrib.auth.decorators import login_required
@@ -97,5 +97,5 @@ urlpatterns = auth_urlpatterns + [
url(r'^userpage/(.+)/$', userpage, name="userpage"),
# This line is only required to render the password reset with is_admin=True
- url(r'^admin/', include(admin.site.urls)),
+ url(r'^admin/', admin.site.urls),
]
diff --git a/tests/auth_tests/urls_admin.py b/tests/auth_tests/urls_admin.py
index 8d2fe3fd10..8e5b0f1f0c 100644
--- a/tests/auth_tests/urls_admin.py
+++ b/tests/auth_tests/urls_admin.py
@@ -2,7 +2,7 @@
Test URLs for auth admins.
"""
-from django.conf.urls import include, url
+from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth.admin import GroupAdmin, UserAdmin
from django.contrib.auth.models import Group, User
@@ -14,5 +14,5 @@ site.register(User, UserAdmin)
site.register(Group, GroupAdmin)
urlpatterns += [
- url(r'^admin/', include(site.urls)),
+ url(r'^admin/', site.urls),
]
diff --git a/tests/auth_tests/urls_custom_user_admin.py b/tests/auth_tests/urls_custom_user_admin.py
index f8bc194ba5..dc47be68c7 100644
--- a/tests/auth_tests/urls_custom_user_admin.py
+++ b/tests/auth_tests/urls_custom_user_admin.py
@@ -1,4 +1,4 @@
-from django.conf.urls import include, url
+from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
@@ -16,5 +16,5 @@ class CustomUserAdmin(UserAdmin):
site.register(get_user_model(), CustomUserAdmin)
urlpatterns = [
- url(r'^admin/', include(site.urls)),
+ url(r'^admin/', site.urls),
]