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
ddfc7c25
Kaydet (Commit)
ddfc7c25
authored
Nis 30, 2012
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #4746 -- Allowed spaces around filter separator.
üst
78ba9670
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
base.py
django/template/base.py
+1
-1
tests.py
tests/regressiontests/templates/tests.py
+4
-4
No files found.
django/template/base.py
Dosyayı görüntüle @
ddfc7c25
...
@@ -486,7 +486,7 @@ constant_string = constant_string.replace("\n", "")
...
@@ -486,7 +486,7 @@ constant_string = constant_string.replace("\n", "")
filter_raw_string
=
r"""
filter_raw_string
=
r"""
^(?P<constant>
%(constant)
s)|
^(?P<constant>
%(constant)
s)|
^(?P<var>[
%(var_chars)
s]+|
%(num)
s)|
^(?P<var>[
%(var_chars)
s]+|
%(num)
s)|
(?:
%(filter_sep)
s
(?:
\s*
%(filter_sep)
s\s*
(?P<filter_name>\w+)
(?P<filter_name>\w+)
(?:
%(arg_sep)
s
(?:
%(arg_sep)
s
(?:
(?:
...
...
tests/regressiontests/templates/tests.py
Dosyayı görüntüle @
ddfc7c25
...
@@ -634,11 +634,11 @@ class Templates(unittest.TestCase):
...
@@ -634,11 +634,11 @@ class Templates(unittest.TestCase):
# Chained filters
# Chained filters
'filter-syntax02'
:
(
"{{ var|upper|lower }}"
,
{
"var"
:
"Django is the greatest!"
},
"django is the greatest!"
),
'filter-syntax02'
:
(
"{{ var|upper|lower }}"
,
{
"var"
:
"Django is the greatest!"
},
"django is the greatest!"
),
#
Raise TemplateSyntaxError for space between a variable and
filter pipe
#
Allow spaces before the
filter pipe
'filter-syntax03'
:
(
"{{ var |upper }}"
,
{
},
template
.
TemplateSyntaxError
),
'filter-syntax03'
:
(
"{{ var |upper }}"
,
{
"var"
:
"Django is the greatest!"
},
"DJANGO IS THE GREATEST!"
),
#
Raise TemplateSyntaxError for space after a
filter pipe
#
Allow spaces after the
filter pipe
'filter-syntax04'
:
(
"{{ var| upper }}"
,
{
},
template
.
TemplateSyntaxError
),
'filter-syntax04'
:
(
"{{ var| upper }}"
,
{
"var"
:
"Django is the greatest!"
},
"DJANGO IS THE GREATEST!"
),
# Raise TemplateSyntaxError for a nonexistent filter
# Raise TemplateSyntaxError for a nonexistent filter
'filter-syntax05'
:
(
"{{ var|does_not_exist }}"
,
{},
template
.
TemplateSyntaxError
),
'filter-syntax05'
:
(
"{{ var|does_not_exist }}"
,
{},
template
.
TemplateSyntaxError
),
...
...
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