#34808: Some aggregation functions may return None; this isn't well documented
--------------------------------------+------------------------------------
Reporter: Eric Baumgartner | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by David Sanders):
Hi Eric,
Thanks for putting your hand up to take a shot! Writing docs isn't too
hard, basically need to check out the repo and update the relevant file
under docs/. It's all in Sphinx and each file corresponds to a page in the
docs (the file path corresponds to the URL path, conveniently enough). You
then run `make html` and point your browser to the generated html.
See https://docs.djangoproject.com/en/dev/internals/contributing/writing-
documentation/ Carlton also mentioned that there was some effort to try
aligning the docs to: https://diataxis.fr/
Once your happy with how it looks it's simply a matter of creating a pull
request and referencing this ticket. (see commit log for message format)
Re your points:
- It's not just empty querysets that produce `None`. Empty groups in a
non-empty queryset will do the same thing.
- A section on handling `None` using `default` is a good idea 👍
Explaining why it returns `None` by default is also a good idea.
- I'm not sure whether it's worth going through every example to
explicitly handle defaults, the dedicated section may be enough, Nessita &
Felix may make a call on this.
Good luck!
--
Ticket URL: <https://code.djangoproject.com/ticket/34808#comment:3>
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/0107018a59f74c68-71e3a7b0-cbd6-4757-ad5f-8a99ead22e41-000000%40eu-central-1.amazonses.com.