Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#28648 closed Bug (fixed)

Error in chaining filters example in documentation

Reported by: Dave Jagoda Owned by: Stefan Schneider
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Dave Jagoda Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://docs.djangoproject.com/en/1.11/topics/db/queries/#chaining-filters

(Same error exists in 1.10 and perhaps others)

>>> Entry.objects.filter(
...     headline__startswith='What'
... ).exclude(
...     pub_date__gte=datetime.date.today()
... ).filter(
...     pub_date__gte=datetime(2005, 1, 30)
... )

I believe should contain this instead:

pub_date__gte=datetime.date(2005, 1, 30)

Change History (7)

comment:1 by Dave Jagoda, 7 years ago

Cc: Dave Jagoda added

comment:2 by Stefan Schneider, 6 years ago

Owner: changed from nobody to Stefan Schneider
Status: newassigned

comment:3 by Tim Graham, 6 years ago

Triage Stage: UnreviewedReady for checkin
Type: UncategorizedBug

in reply to:  description comment:4 by Stefan Schneider, 6 years ago

Version: 1.11master

The example in the docs seems to be incorrect in the master branch too, I have submitted a pull request for the master branch here.

comment:5 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In 293df73f:

Fixed #28648 -- Corrected typo in docs/topics/db/queries.txt.

comment:6 by Tim Graham <timograham@…>, 6 years ago

In 9f9a8a6c:

[2.0.x] Fixed #28648 -- Corrected typo in docs/topics/db/queries.txt.

Backport of 293df73fb67a56c0417af8c39f808f64bc03cbeb from master

comment:7 by Tim Graham <timograham@…>, 6 years ago

In e8a82e82:

[1.11.x] Fixed #28648 -- Corrected typo in docs/topics/db/queries.txt.

Backport of 293df73fb67a56c0417af8c39f808f64bc03cbeb from master

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