#31720: Better documentation and defaults for BoolOr and BoolAnd
--------------------------------------------+------------------------
Reporter: Alex Scott | Owner: (none)
Type: Uncategorized | Status: new
Component: contrib.postgres | Version: 3.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
The only documentation available (that I found at least) for Postgres DB
functions is:
https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/aggregates/
It would be really nice to have an example or two for each of those.
One issue I ran into with `BoolOr` when I was doing something like
`BoolOr(Q('someCharField') == Value('someVal'))` (which in itself would be
a great example to show), is an error:
`'Cannot resolve expression type, unknown output_field'`
Adding `output_field=BooleanField()` seemed to solve it but this wasn't
intuitive. Shouldn't the default output for `BoolOr` be boolean? If so,
it would be good to set it as such I think.
--
Ticket URL: <https://code.djangoproject.com/ticket/31720>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.132ad34b7f739d776ddd0d03d6756017%40djangoproject.com.