I have a question about the "Polls" app, as described in the Django 
Beginners' Tutorial, https://docs.djangoproject.com/en/1.10/intro/.  In 
tutorial 3, the index view contains the following code:

 

latest_question_list = Question.objects.order_by('-pub_date')[:5]

 

It is stated that this produces the latest 5 questions according to 
publication date.  The '-' in front of 'pub_date' is intended to return the 
questions in descending rather than ascending order of publication date.  
Yet when I tried this out, it returns the *earliest* 5 questions in my 
database.  Is this an error, or (more likely), have I done something wrong?

 

Thanks for any advice!

 

David

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fee87591-bc0d-4ecf-9ec2-062f1646cc4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to