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
ba749f8f
Kaydet (Commit)
ba749f8f
authored
Agu 13, 2016
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #13408 -- Removed obsolete code/comments from {% for %} unpacking deprecation.
üst
c6cd9f4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
defaulttags.py
django/template/defaulttags.py
+3
-11
No files found.
django/template/defaulttags.py
Dosyayı görüntüle @
ba749f8f
...
...
@@ -189,10 +189,6 @@ class ForNode(Node):
if
unpack
:
# If there are multiple loop variables, unpack the item into
# them.
# To complete this deprecation, remove from here to the
# try/except block as well as the try/except itself,
# leaving `unpacked_vars = ...` and the "else" statements.
if
not
isinstance
(
item
,
(
list
,
tuple
)):
len_item
=
1
else
:
...
...
@@ -203,13 +199,9 @@ class ForNode(Node):
"Need {} values to unpack in for loop; got {}. "
.
format
(
num_loopvars
,
len_item
),
)
try
:
unpacked_vars
=
dict
(
zip
(
self
.
loopvars
,
item
))
except
TypeError
:
pass
else
:
pop_context
=
True
context
.
update
(
unpacked_vars
)
unpacked_vars
=
dict
(
zip
(
self
.
loopvars
,
item
))
pop_context
=
True
context
.
update
(
unpacked_vars
)
else
:
context
[
self
.
loopvars
[
0
]]
=
item
...
...
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