#13181: ChoiceField.choices need to accept callable, not only list or tuple
---------------------------------+------------------------------------------
          Reporter:  mariarchi   |         Owner:  nobody              
            Status:  new         |     Milestone:                      
         Component:  Forms       |       Version:  1.2-beta            
        Resolution:              |      Keywords:  ChoiceField, choices
             Stage:  Unreviewed  |     Has_patch:  1                   
        Needs_docs:  0           |   Needs_tests:  1                   
Needs_better_patch:  0           |  
---------------------------------+------------------------------------------
Comment (by mrts):

 It's still important to check if the result can be converted to a list:

 {{{
 if callable(value):
     value = value()
 value = list(value)
 }}}

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