Opened 16 years ago

Closed 16 years ago

#7405 closed (invalid)

typo in model api doc

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

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 by Jeff Anderson, 16 years ago

Has patch: unset
Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 16 years ago

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