Opened 9 years ago

Closed 9 years ago

#7405 closed (invalid)

typo in model api doc

Reported by: Gergely Kontra Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: typo, api
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

At filters:

date should be less than or equal to now

Entry.objects.filter(
    headline__startswith='What').exclude(
        pub_date__lte=datetime.now()).filter(
            pub_date__gte=datetime(2005, 1, 1))

Change History (2)

comment:1 Changed 9 years ago by Jeff Anderson

Has patch: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 9 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

Example is correct. Read the query more carefully - it _excludes_ all dates after now, and _includes_ dates after 1 jan 2005. Net result is exactly as described.

Note: See TracTickets for help on using tickets.
Back to Top