mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
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.
This commit is contained in:
parent
39937de7e6
commit
1e82094f1b
30 changed files with 352 additions and 113 deletions
|
@ -3,12 +3,12 @@ from django.contrib import admin
|
|||
|
||||
from . import views
|
||||
|
||||
ns_patterns = [
|
||||
ns_patterns = ([
|
||||
url(r'^xview/func/$', views.xview_dec(views.xview), name='func'),
|
||||
]
|
||||
], 'test')
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^admindocs/', include('django.contrib.admindocs.urls')),
|
||||
url(r'^', include(ns_patterns, namespace='test')),
|
||||
url(r'^xview/func/$', views.xview_dec(views.xview)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue