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
97121cb9
Kaydet (Commit)
97121cb9
authored
Ock 12, 2013
tarafından
Stephan Jaekel
Kaydeden (comit)
Claude Paroz
Ock 12, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #18026 -- Don't return an anonymous dict if extra_data in storage is empty.
üst
a170c3f7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
storage.py
django/contrib/formtools/tests/wizard/storage.py
+10
-0
base.py
django/contrib/formtools/wizard/storage/base.py
+1
-1
No files found.
django/contrib/formtools/tests/wizard/storage.py
Dosyayı görüntüle @
97121cb9
...
@@ -75,3 +75,13 @@ class TestStorage(object):
...
@@ -75,3 +75,13 @@ class TestStorage(object):
storage
.
extra_data
=
extra_context
storage
.
extra_data
=
extra_context
storage2
=
self
.
get_storage
()(
'wizard2'
,
request
,
None
)
storage2
=
self
.
get_storage
()(
'wizard2'
,
request
,
None
)
self
.
assertEqual
(
storage2
.
extra_data
,
{})
self
.
assertEqual
(
storage2
.
extra_data
,
{})
def
test_extra_context_key_persistence
(
self
):
request
=
get_request
()
storage
=
self
.
get_storage
()(
'wizard1'
,
request
,
None
)
self
.
assertFalse
(
'test'
in
storage
.
extra_data
)
storage
.
extra_data
[
'test'
]
=
True
self
.
assertTrue
(
'test'
in
storage
.
extra_data
)
django/contrib/formtools/wizard/storage/base.py
Dosyayı görüntüle @
97121cb9
...
@@ -37,7 +37,7 @@ class BaseStorage(object):
...
@@ -37,7 +37,7 @@ class BaseStorage(object):
current_step
=
lazy_property
(
_get_current_step
,
_set_current_step
)
current_step
=
lazy_property
(
_get_current_step
,
_set_current_step
)
def
_get_extra_data
(
self
):
def
_get_extra_data
(
self
):
return
self
.
data
[
self
.
extra_data_key
]
or
{}
return
self
.
data
[
self
.
extra_data_key
]
def
_set_extra_data
(
self
,
extra_data
):
def
_set_extra_data
(
self
,
extra_data
):
self
.
data
[
self
.
extra_data_key
]
=
extra_data
self
.
data
[
self
.
extra_data_key
]
=
extra_data
...
...
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