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
1aa8e860
Kaydet (Commit)
1aa8e860
authored
Mar 28, 2017
tarafından
Stefan Wehrmeyer
Kaydeden (comit)
Tim Graham
Nis 01, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27989 -- Preserved empty QueryDicts for form's data/files args.
üst
24023c6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
forms.py
django/forms/forms.py
+2
-2
test_forms.py
tests/forms_tests/tests/test_forms.py
+7
-0
No files found.
django/forms/forms.py
Dosyayı görüntüle @
1aa8e860
...
...
@@ -76,8 +76,8 @@ class BaseForm:
initial
=
None
,
error_class
=
ErrorList
,
label_suffix
=
None
,
empty_permitted
=
False
,
field_order
=
None
,
use_required_attribute
=
None
,
renderer
=
None
):
self
.
is_bound
=
data
is
not
None
or
files
is
not
None
self
.
data
=
data
or
{}
self
.
files
=
files
or
{}
self
.
data
=
{}
if
data
is
None
else
data
self
.
files
=
{}
if
files
is
None
else
files
self
.
auto_id
=
auto_id
if
prefix
is
not
None
:
self
.
prefix
=
prefix
...
...
tests/forms_tests/tests/test_forms.py
Dosyayı görüntüle @
1aa8e860
...
...
@@ -164,6 +164,13 @@ class FormsTestCase(SimpleTestCase):
<input type="text" name="birthday" id="id_birthday" required /></p>"""
)
def
test_empty_querydict_args
(
self
):
data
=
QueryDict
()
files
=
QueryDict
()
p
=
Person
(
data
,
files
)
self
.
assertIs
(
p
.
data
,
data
)
self
.
assertIs
(
p
.
files
,
files
)
def
test_unbound_form
(
self
):
# If you don't pass any values to the Form's __init__(), or if you pass None,
# the Form will be considered unbound and won't do any validation. Form.errors
...
...
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