#3678: BaseForm loses field sorting
------------------------+---------------------------------------------------
Reporter:  SmileyChris  |       Owner:  adrian         
  Status:  new          |   Component:  django.newforms
 Version:  SVN          |    Keywords:                 
   Stage:  Unreviewed   |   Has_patch:  1              
------------------------+---------------------------------------------------
 Came across this in a project just now when I had overridden `BaseForm`
 for a special form of my own. The fields were coming out in a different
 order from what I had specified.
 
 The reason is that the `__init__` of `BaseForm` does:
 {{{
 #!python
 self.fields = self.base_fields.copy()
 }}}
 Even if `base_fields` is a `SortedDict`, `.copy()` is just the normal dict
 function so fields becomes a `dict` class and loses field sorting.
 
 Simple patch attached.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3678>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to