Opened 7 years ago

Closed 7 years ago

#7405 closed (invalid)

typo in model api doc

Reported by: pihentagy 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 7 years ago by programmerq

  • Has patch unset
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by russellm

  • Resolution set to invalid
  • Status changed from new to closed

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