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
1c169566
Kaydet (Commit)
1c169566
authored
May 18, 2013
tarafından
Erik Romijn
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed argument order for localized_fields to ensure backwards compatibility
üst
756b81db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
models.py
django/forms/models.py
+3
-3
No files found.
django/forms/models.py
Dosyayı görüntüle @
1c169566
...
...
@@ -136,7 +136,7 @@ def model_to_dict(instance, fields=None, exclude=None):
data
[
f
.
name
]
=
f
.
value_from_object
(
instance
)
return
data
def
fields_for_model
(
model
,
fields
=
None
,
exclude
=
None
,
widgets
=
None
,
localized_fields
=
None
,
formfield_callback
=
None
):
def
fields_for_model
(
model
,
fields
=
None
,
exclude
=
None
,
widgets
=
None
,
formfield_callback
=
None
,
localized_fields
=
None
):
"""
Returns a ``SortedDict`` containing form fields for the given model.
...
...
@@ -246,7 +246,7 @@ class ModelFormMetaclass(type):
opts
.
fields
=
None
fields
=
fields_for_model
(
opts
.
model
,
opts
.
fields
,
opts
.
exclude
,
opts
.
widgets
,
opts
.
localized_fields
,
formfield_callback
)
opts
.
widgets
,
formfield_callback
,
opts
.
localized_fields
)
# make sure opts.fields doesn't specify an invalid field
none_model_fields
=
[
k
for
k
,
v
in
six
.
iteritems
(
fields
)
if
not
v
]
...
...
@@ -413,7 +413,7 @@ class ModelForm(six.with_metaclass(ModelFormMetaclass, BaseModelForm)):
pass
def
modelform_factory
(
model
,
form
=
ModelForm
,
fields
=
None
,
exclude
=
None
,
localized_fields
=
None
,
widgets
=
None
,
formfield_callback
=
None
):
formfield_callback
=
None
,
widgets
=
None
,
localized_fields
=
None
):
"""
Returns a ModelForm containing form fields for the given model.
...
...
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