Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#18189 closed Bug (invalid)

Missing a .all() in Tutorial 4

Reported by: thungp@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In the section use generic views: Less code is better
in the Change it like so:

What there currently is as of 4/22/12 is as follows:

I believe you meant this:

Change History (6)

comment:1 Changed 7 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

The .all() can be implied in this context; it isn't required.

comment:2 Changed 7 years ago by anonymous


until I did that, I didn't get any results back when I went to the polls URL.
Plus it doesn't really follow the syntax on the Tutorial Page 3.


comment:3 Changed 7 years ago by anonymous

Resolution: invalid
Status: closedreopened

I'm running django 1.4.
Based on your comment, it appears you shouldn't have to do this .all() for it to work.
I'm curious dd you actually try this and what version of django/python is this supposed to work?


comment:4 Changed 7 years ago by Alex Gaynor

Resolution: invalid
Status: reopenedclosed

The all() has never, at any point in Django's history been required here.

comment:5 Changed 7 years ago by anonymous



If I understand you correctly, then, if I remove the .all() like in the original
tutorial, and it doesn't return anything, but then put it back
and it does return something... do you have any thoughts on what the problem
could be?

Then I would suggest for consistency sake, you should consider remove the .all()
from the examples in part 3 of the tutorial, however,
I would humbly recommend testing it 1st. (which is how I managed to solve not
getting results back).
When I come home tonight, I can do that to see if it has similar effects on the
query results like I'm currently getting.
Of course, based on the feedback I've seen from this submission, it appears like
it is a localized problem with my setup
and not the norm.

I'm using sqlite3 for db backend when going through the tutorial. I'm wondering
if that has any bearing on this.
Or could it be the python version I'm using?



comment:6 Changed 7 years ago by thungp@…


looks like it was probably a typo or operator error. I can't seem to be able to reproduce it. It appears to work both with and without the .all().


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