Index: tutorial04.txt
===================================================================
--- tutorial04.txt	(revision 5512)
+++ tutorial04.txt	(working copy)
@@ -193,7 +193,7 @@
     urlpatterns = patterns('',
         (r'^$', 'django.views.generic.list_detail.object_list', info_dict),
         (r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', info_dict),
-        (r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html')),
+        (r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html'), 'poll_results'),
         (r'^(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),
     )
 
@@ -209,6 +209,9 @@
       from the URL to be called ``"object_id"``, so we've changed ``poll_id`` to
       ``object_id`` for the generic views.
 
+    * We've added a name ``poll_results`` to the results view so that we
+      have a way to refer to its url later on. 
+
 By default, the ``object_detail`` generic view uses a template called
 ``<app name>/<model name>_detail.html``. In our case, it'll use the template
 ``"polls/poll_detail.html"``. Thus, rename your ``polls/detail.html`` template to
@@ -255,6 +258,14 @@
 ``polls/detail.html`` to ``polls/poll_detail.html``, and pass ``object`` in the
 context instead of ``poll``.
 
+The last thing we have to do is fix the url handling to account for
+the use of generic views. In the vote view we used ``reverse`` to
+avoid hard-coding our urls. Change the string 'mysite.polls.detail' in
+the reverse function to 'poll_results', the name we specified in our
+url configuration:
+    
+    return HttpResponseRedirect(reverse('poll_results', args=(p.id,)))
+
 Run the server, and use your new polling app based on generic views.
 
 For full details on generic views, see the `generic views documentation`_.
