#15497: BooleanField should work for all PostgreSQL expressions
-------------------------------------+-------------------------------------
Reporter: lsaffre | Owner: nobody
Type: New | Status: new
feature | Component: Database layer
Milestone: | (models, ORM)
Version: SVN | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Comment (by mtredinnick):
Whilst PostgreSQL supports various literals for true and false, it returns
a much more constrained set, which is what Django needs to understand (and
they are typically handled long before getting to this level). Most of the
slightly odd "not really boolean" values that are currently accepted in
model fields are historical legacy stuff and that isn't an excuse to add
yet more. Anything populating a model field can reasonably be expected to
normalise it's true/false input to Python True/False values, I feel.
As noted earlier, altering model fields to handle particular form (HTTP)
submission raw data is the wrong level. If you're not using Django's
forms, then your own form handling code should be doing various pieces of
normalisation (or writing a custom model field to do it for you).
Will leave open for a second opinion, but I'm -1 on this.
--
Ticket URL: <https://code.djangoproject.com/ticket/15497#comment:8>
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 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.