#5857: exclude_fields to pair with fields in form_for_model
---------------------------------------------+------------------------------
Reporter:  italomaia <[EMAIL PROTECTED]>  |       Owner:  nobody                
    
  Status:  new                               |   Component:  django.newforms    
       
 Version:  SVN                               |    Keywords:  form_for_model 
enhancement
   Stage:  Unreviewed                        |   Has_patch:  0                  
       
---------------------------------------------+------------------------------
 I was thinking, if there is the parameter "fields" with form_for_model, as
 a helper, it should existe something like exclude_fields,
 because sometimes, one wants to hide from his form but one field. Doesn't
 seem "kind" to make a poor developer to
 write a full set of fields just to "hide" a single one. Example:
 {{{
 class Example(models.Model):
     name = models.CharField(maxlength=20)
     name2 = models.CharField(maxlength=20)
     name3 = models.CharField(maxlength=20)
     show = models.BooleanField(default=True)

 ExForm1 = form_for_model(Example, fields=('name1', 'name2', 'name3'))
 #exists
 ExForm2 = form_for_model(Example, exclude_fields=('show')) #should exist
 ExForm1 == ExForm2 -> True
 }}}

 -- Kind is good {{{^__^}}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5857>
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