#10792: documentation error on ModelForm ModelChoiceField empty option
-------------------------------+--------------------------------------------
          Reporter:  carljm    |         Owner:  carljm
            Status:  assigned  |     Milestone:  1.1   
         Component:  Forms     |       Version:  SVN   
        Resolution:            |      Keywords:        
             Stage:  Accepted  |     Has_patch:  0     
        Needs_docs:  0         |   Needs_tests:  0     
Needs_better_patch:  0         |  
-------------------------------+--------------------------------------------
Changes (by carljm):

  * owner:  nobody => carljm
  * status:  new => assigned

Comment:

 Great, I was hoping that would be the answer.  Patch attached.

 The current patch means that if someone has a ModelChoiceField with
 required=True and an initial value, they cannot use empty_label to force
 the creation of an empty option.  I can't think of a use case for this,
 but if we want to preserve that possibility it will mean complicating the
 empty_label argument a bit: giving it some default sentinel value
 (normally would be None, but since that has meaning in this case we can't
 use it) so we know when it's been set explicitly.

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