Ticket #1682: htmlFixes.diff
File htmlFixes.diff, 1.2 KB (added by , 19 years ago) |
---|
-
tutorial04.txt
175 175 urlpatterns = patterns('', 176 176 (r'^$', 'django.views.generic.list_detail.object_list', info_dict), 177 177 (r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', info_dict), 178 (r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results ')),178 (r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html')), 179 179 (r'^(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'), 180 180 ) 181 181 … … 203 203 204 204 Because we have more than one entry in the URLconf that uses ``object_detail`` 205 205 for the polls app, we manually specify a template name for the results view: 206 ``template_name='polls/results '``. Otherwise, both views would use the same206 ``template_name='polls/results.html'``. Otherwise, both views would use the same 207 207 template. Note that we use ``dict()`` to return an altered dictionary in place. 208 208 209 209 In previous versions of the tutorial, the templates have been provided with a context