#23130: BooleanField should not override 'blank' if choices are specified
-------------------------------------+-------------------------------------
Reporter: jonash | Owner: tushar
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by jonash):
Actually, my initial suggestion feels like something that violates the
"separation of concerns" principle. Interpreting browser-submitted values
should happen in the ''checkbox Widget''. This is completely unrelated to
the model layer. Why not have `BooleanField` behave as follows:
* Don't override `blank` at all
* `CheckboxInput` should interpret "value absent from POST" as False, any
other value as True (already does this)
* `BooleanField` should interpret None as a blank value (already does
this)
Why does `BooleanField` need to have `blank=True` in the first place?
--
Ticket URL: <https://code.djangoproject.com/ticket/23130#comment:10>
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/064.1eb5f3fb433c315524fd4750f44b827a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.