#33484: Improve docs about date lookup filter
-------------------------------------+-------------------------------------
Reporter: MojixCoder | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 4.0
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => wontfix
Comment:
Hi MojixCoder.
I'm going to say `wontfix` here.
That you can pass a `datetime` or suitably formatted string is relying on
the internals of `DateField.to_python()`. If you know about it then fair
enough, but I don't think it makes for more readable code to document and
promote that. It's more in-line with the expectations to just use, and
just show using, a date.
Moreover, if we open the gates here we probably need to reference
`django.utils.dateparse.parse_date()`, and give examples of the kinds of
values that are acceptable, and then maybe expand `DateField` docs to leak
some of that info too — which is all implementation details. I'm not at
all sure it makes anything clearer for the majority of readers.
Nonetheless, if you want to suggest a concise edit, we can consider.
I hope that makes sense.
----
--
Ticket URL: <https://code.djangoproject.com/ticket/33484#comment:6>
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/068.f72bccd4550dee6d11ab8fd419ac68e0%40djangoproject.com.