Opened 3 years ago

Last modified 3 years ago

#33484 closed Cleanup/optimization

Improve docs about date lookup filter — at Version 5

Reported by: MojixCoder Owned by: nobody
Component: Documentation Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by MojixCoder)

Django docs about date lookup filter:

For datetime fields, casts the value as date. Allows chaining additional field lookups. Takes a date value.

But I have tried that we can also use a string value representing the date or datetime object instead of date object.
and also all of the examples of this filter are implemented using date objects.
Shouldn't we add that we can also pass a string or datetime value instead of date?

So the docs says it only takes date object.
But in reality it takes datetime, date, str objects.

Here is the https://docs.djangoproject.com/en/4.0/ref/models/querysets/#date in the docs.

Change History (5)

comment:1 by MojixCoder, 3 years ago

Description: modified (diff)

comment:2 by MojixCoder, 3 years ago

Description: modified (diff)

comment:3 by MojixCoder, 3 years ago

Description: modified (diff)

comment:4 by MojixCoder, 3 years ago

Summary: Improve docsImprove docs about date lookup filter

comment:5 by MojixCoder, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top