#4019: Use default-value of model-fields as initial-value for newforms-fields
------------------------------------------------------+---------------------
Reporter:  David Danier <[EMAIL PROTECTED]>  |       Owner:  adrian             
                 
  Status:  new                                        |   Component:  
django.newforms                     
 Version:  SVN                                        |    Keywords:  model 
default newforms field initial
   Stage:  Unreviewed                                 |   Has_patch:  1         
                          
------------------------------------------------------+---------------------
 I think using the default-value of a model-field as the initial value of
 the newsforms equivalent could be useful. So I added setting
 defaults['initial'] in the formfield()-method of every model-fields.
 As I'm not really using this the code is only tested a little, but looks
 working.
 
 I did not put the code into django.newforms.models.* as I think this
 should be handled inside the field itself (like all other values). But
 perhaps some solution could be found to avoid code duplication (DRY).

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