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
9f3b9ffd
Kaydet (Commit)
9f3b9ffd
authored
Tem 31, 2018
tarafından
Dražen Odobašić
Kaydeden (comit)
Tim Graham
Tem 31, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #29617 -- Fixed Template crash if template_string is lazy.
Regression in
3a148f95
.
üst
4198445a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
base.py
django/template/base.py
+1
-1
2.0.8.txt
docs/releases/2.0.8.txt
+3
-0
test_base.py
tests/template_tests/test_base.py
+8
-1
No files found.
django/template/base.py
Dosyayı görüntüle @
9f3b9ffd
...
...
@@ -152,7 +152,7 @@ class Template:
self
.
name
=
name
self
.
origin
=
origin
self
.
engine
=
engine
self
.
source
=
template_string
self
.
source
=
str
(
template_string
)
# May be lazy.
self
.
nodelist
=
self
.
compile_nodelist
()
def
__iter__
(
self
):
...
...
docs/releases/2.0.8.txt
Dosyayı görüntüle @
9f3b9ffd
...
...
@@ -11,3 +11,6 @@ Bugfixes
* Fixed a regression in Django 2.0.7 that broke the ``regex`` lookup on MariaDB
(even though MariaDB isn't officially supported) (:ticket:`29544`).
* Fixed a regression where ``django.template.Template`` crashed if the
``template_string`` argument is lazy (:ticket:`29617`).
tests/template_tests/test_base.py
Dosyayı görüntüle @
9f3b9ffd
from
django.template
.base
import
Variable
,
VariableDoesNotExist
from
django.template
import
Context
,
Template
,
Variable
,
VariableDoesNotExist
from
django.test
import
SimpleTestCase
from
django.utils.translation
import
gettext_lazy
class
TemplateTests
(
SimpleTestCase
):
def
test_lazy_template_string
(
self
):
template_string
=
gettext_lazy
(
'lazy string'
)
self
.
assertEqual
(
Template
(
template_string
)
.
render
(
Context
()),
template_string
)
class
VariableDoesNotExistTests
(
SimpleTestCase
):
...
...
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