#27986: Change BaseModelForm dictionary variable object_data to be OrderedDict
-------------------------------------+-------------------------------------
Reporter: Edvinas | Owner: nobody
Jurevicius |
Type: | Status: new
Uncategorized |
Component: | Version: 1.10
Uncategorized | Keywords: BaseModelForm,
Severity: Normal | object_data, OrderedDict
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Can we change dictionary variable `object_data` to be OrderedDict this
would help if we pass initial data as OrderedDict and want to loop through
initial form values to be in the same order?
{{{
In [4]: initial
Out[4]: OrderedDict([(u'id', u'111'), (u'category', u'1'), (u'title',
u'Chief Executives and Senior Officials')])
In [5]: object_data = OrderedDict()
In [6]: object_data.update(initial)
In [7]: object_data
Out[7]: OrderedDict([(u'id', u'111'), (u'category', u'1'), (u'title',
u'Chief Executives and Senior Officials')])
}}}
https://github.com/django/django/blob/master/django/forms/models.py#L280
--
Ticket URL: <https://code.djangoproject.com/ticket/27986>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.28042953f5e33fda1c3d9afadc1be852%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.