#5986: [PATCH] Custom field order in newforms
------------------------------------------------+---------------------------
   Reporter:  emes                              |                Owner:  nobody 
        
     Status:  new                               |            Component:  
django.newforms
    Version:  SVN                               |           Resolution:         
        
   Keywords:  field order weight form newforms  |                Stage:  
Unreviewed     
  Has_patch:  1                                 |           Needs_docs:  0      
        
Needs_tests:  0                                 |   Needs_better_patch:  0      
        
------------------------------------------------+---------------------------
Comment (by Patryk Zawadzki <[EMAIL PROTECTED]>):

 Replying to [comment:5 jkocherhans]:
 > I'm sorry to be blunt, but I couldn't be more against this change, or
 rather the weight=X syntax. I'm working on a new class called
 {{{ModelForm}}} right now (search django-dev for the relevant thread) that
 should allow something similar to the {{{fields_order}}} attribute above.
 It's just called {{{fields}}} and it will actually restrict the fields
 that occur in the form as well.

 This has little or nothing to do with form_for_* syntax. This adds the
 ordering ability for all Form subclasses as it only operates inside the
 metaclass. If your ModelForm class or any other class extends Form then it
 gains this feature for free.

 The only relevant bit would be removing the small block of code including
 the comment about form_for_* once these functions die.

 I think the patch is still appropriate to commit and it adds a nice
 regression test so you can be sure things work like they did and will
 continue to do so.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5986#comment:6>
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