Permalink
Browse files

Fixed #6550 - Changed generic view portion of the tutorial so it's eq…

…uivalent to "the hard way" results. Thanks Alexandre Dupas for the suggestion.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent ddfe700 commit 1fab808b1fd94394d96af54caa6957663e14f06d @timgraham timgraham committed Dec 27, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 docs/intro/tutorial04.txt
@@ -238,7 +238,7 @@ Change it like so::
urlpatterns = patterns('',
(r'^$',
ListView.as_view(
- model=Poll,
+ queryset=Poll.objects.order_by('-pub_date')[:5],
context_object_name='latest_poll_list',
template_name='polls/index.html')),
(r'^(?P<pk>\d+)/$',

0 comments on commit 1fab808

Please sign in to comment.