Ticket #4908: tutorial04.diff
File tutorial04.diff, 1.3 KB (added by , 17 years ago) |
---|
-
docs/tutorial04.txt
193 193 urlpatterns = patterns('', 194 194 (r'^$', 'django.views.generic.list_detail.object_list', info_dict), 195 195 (r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', info_dict), 196 (r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html'), 'poll_results'),196 url(r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html'), 'poll_results'), 197 197 (r'^(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'), 198 198 ) 199 199 … … 210 210 ``object_id`` for the generic views. 211 211 212 212 * We've added a name, ``poll_results``, to the results view so that we have 213 a way to refer to its URL later on (see `naming URL patterns`_ for more on 214 named patterns). 213 a way to refer to its URL later on. The syntax for this is 214 slightly different -- see `naming URL patterns`_ for more on 215 named patterns. 215 216 216 217 .. _naming URL patterns: http://www.djangoproject.com/documentation/url_dispatch/#naming-url-patterns 217 218