#23130: BooleanField should either forbid setting 'choices' or not override 
'blank'
----------------------------------------------+--------------------
     Reporter:  jonash                        |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  master
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 BooleanField currently allows settings 'choices'. It also always overrides
 'blank'. This stems from the fact that in HTML, a blank value means False,
 and any (?) non-blank value means True for check boxes.

 Now if you override 'choices', things change in terms of HTML, since now
 True and False are represented by "True" and "False" in the select box.
 This also makes it possible to supply a null/blank value (which would have
 meant False in the checkbox case).

 BooleanField should either handle this fact gracefully, for instance by
 only overriding 'blank' if 'choices' is not given and then interpreting
 "True" and "False" as True and False. Or it should disallow overriding
 'choices' entirely.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23130>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.0b87e6e50101f3246a6067ef510f6abf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to