mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #27874 -- Fixed URL namespace warning (urls.W005) for nested namespaces.
This commit is contained in:
parent
b6fbf3e8e5
commit
8d4885ede5
2 changed files with 12 additions and 4 deletions
|
@ -5,7 +5,14 @@ common_url_patterns = ([
|
|||
url(r'^app-url/', include([])),
|
||||
], 'common')
|
||||
|
||||
nested_url_patterns = ([
|
||||
url(r'^common/', include(common_url_patterns, namespace='nested')),
|
||||
], 'nested')
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^app-ns1-0/', include(common_url_patterns, namespace='app-include-1')),
|
||||
url(r'^app-ns1-1/', include(common_url_patterns, namespace='app-include-2'))
|
||||
url(r'^app-ns1-1/', include(common_url_patterns, namespace='app-include-2')),
|
||||
# 'nested' is included twice but namespaced by nested-1 and nested-2.
|
||||
url(r'^app-ns1-2/', include(nested_url_patterns, namespace='nested-1')),
|
||||
url(r'^app-ns1-3/', include(nested_url_patterns, namespace='nested-2')),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue