Opened 7 weeks ago

Closed 7 weeks ago

Last modified 7 weeks ago

#28648 closed Bug (fixed)

Error in chaining filters example in documentation

Reported by: Dave Jagoda Owned by: Stefan Schneider
Component: Documentation Version: master
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 Changed 7 weeks ago by Dave Jagoda

Cc: Dave Jagoda added

comment:2 Changed 7 weeks ago by Stefan Schneider

Owner: changed from nobody to Stefan Schneider
Status: newassigned

comment:3 Changed 7 weeks ago by Tim Graham

Triage Stage: UnreviewedReady for checkin
Type: UncategorizedBug

comment:4 in reply to:  description Changed 7 weeks ago by Stefan Schneider

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 Changed 7 weeks ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 293df73f:

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

comment:6 Changed 7 weeks ago by Tim Graham <timograham@…>

In 9f9a8a6c:

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

Backport of 293df73fb67a56c0417af8c39f808f64bc03cbeb from master

comment:7 Changed 7 weeks ago by Tim Graham <timograham@…>

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