Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
b23d2640
Kaydet (Commit)
b23d2640
authored
Mar 03, 2017
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Mar 03, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27887 -- Fixed URLs check crash with namespaced URLs inside non-namespaced URLs.
üst
6b47431a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
urls.py
django/core/checks/urls.py
+4
-1
unique_namespaces.py
tests/check_framework/urls/unique_namespaces.py
+2
-0
No files found.
django/core/checks/urls.py
Dosyayı görüntüle @
b23d2640
...
...
@@ -60,7 +60,10 @@ def _load_all_namespaces(resolver, parents=()):
if
getattr
(
url
,
'namespace'
,
None
)
is
not
None
]
for
pattern
in
url_patterns
:
current
=
parents
+
(
getattr
(
pattern
,
'namespace'
,
()),)
namespace
=
getattr
(
pattern
,
'namespace'
,
None
)
current
=
parents
if
namespace
is
not
None
:
current
+=
(
namespace
,)
namespaces
.
extend
(
_load_all_namespaces
(
pattern
,
current
))
return
namespaces
...
...
tests/check_framework/urls/unique_namespaces.py
Dosyayı görüntüle @
b23d2640
...
...
@@ -15,4 +15,6 @@ urlpatterns = [
# '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'
)),
# namespaced URLs inside non-namespaced URLs.
url
(
r'^app-ns1-4/'
,
include
([
url
(
r'^abc/'
,
include
(
common_url_patterns
))])),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment