#4653: form_for_instance generates empty choice for non-blank CharField with
options
------------------------------------------------------------------------+---
   Reporter:  Ilya Semenov <[EMAIL PROTECTED]>                         |        
        Owner:  adrian         
     Status:  new                                                       |       
     Component:  django.newforms
    Version:  SVN                                                       |       
    Resolution:                 
   Keywords:  form_for_instance form_for_model CharField options blank  |       
         Stage:  Unreviewed     
  Has_patch:  1                                                         |       
    Needs_docs:  0              
Needs_tests:  0                                                         |   
Needs_better_patch:  1              
------------------------------------------------------------------------+---
Comment (by Ilya Semenov <[EMAIL PROTECTED]>):

 > This is true of a normal text input which has a default state of no
 value.
 
 This is true for a normal text input (blank=False) only in a "new
 instance" form (returned by form_for_model), not when editing an existing
 instance (using form_for_instance). You'll never get an empty text input
 for a model instance with form_for_instance, since the instance has been
 fetched from the database and is supposedly valid.
 
 I agree with the the argumentation for form_for_model, though, so the
 better patch is needed.

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