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
00709d70
Kaydet (Commit)
00709d70
authored
Eyl 25, 2017
tarafından
Mariusz Felisiak
Kaydeden (comit)
Tim Graham
Eyl 25, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merged startswith() calls.
üst
67a6ba39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
loader_tags.py
django/template/loader_tags.py
+1
-1
resolvers.py
django/urls/resolvers.py
+1
-1
No files found.
django/template/loader_tags.py
Dosyayı görüntüle @
00709d70
...
...
@@ -222,7 +222,7 @@ def construct_relative_path(current_template_name, relative_name):
Convert a relative path (starting with './' or '../') to the full template
name based on the current_template_name.
"""
if
not
any
(
relative_name
.
startswith
(
x
)
for
x
in
[
"'./"
,
"'../"
,
'"./'
,
'"../'
]
):
if
not
relative_name
.
startswith
((
"'./"
,
"'../"
,
'"./'
,
'"../'
)
):
# relative_name is a variable or a literal that doesn't contain a
# relative path.
return
relative_name
...
...
django/urls/resolvers.py
Dosyayı görüntüle @
00709d70
...
...
@@ -119,7 +119,7 @@ class CheckURLMixin:
# Skip check as it can be useful to start a URL pattern with a slash
# when APPEND_SLASH=False.
return
[]
if
any
(
regex_pattern
.
startswith
(
x
)
for
x
in
(
'/'
,
'^/'
,
'^
\
/'
))
and
not
regex_pattern
.
endswith
(
'/'
):
if
regex_pattern
.
startswith
(
(
'/'
,
'^/'
,
'^
\
/'
))
and
not
regex_pattern
.
endswith
(
'/'
):
warning
=
Warning
(
"Your URL pattern {} has a route beginning with a '/'. Remove this "
"slash as it is unnecessary. If this pattern is targeted in an "
...
...
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