diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-04-29 01:10:16 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-04-29 01:10:16 +0000 |
| commit | 07b42f223470083df70134d3dfb3507b20bff768 (patch) | |
| tree | 905a6c3af2a844d199c76edc73107687c2de460d /docs/tutorial04.txt | |
| parent | b4e85c7d1c7dcff1deda70f09ff21a6f99d34da7 (diff) | |
magic-removal: Fixed #1704, #1682, #1693, #1694, #1695, #1696 -- Made corrections to tutorials. Thanks, Malcolm and crew
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/tutorial04.txt')
| -rw-r--r-- | docs/tutorial04.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/tutorial04.txt b/docs/tutorial04.txt index 47f9810547..67974327a3 100644 --- a/docs/tutorial04.txt +++ b/docs/tutorial04.txt @@ -39,7 +39,7 @@ A quick rundown: Django; it's just good Web development practice. Now, let's create a Django view that handles the submitted data and does -something with it. Remember, in `Tutorial 3`_, we create a URLconf for the +something with it. Remember, in `Tutorial 3`_, we created a URLconf for the polls application that includes this line:: (r'^(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'), @@ -151,8 +151,8 @@ conversion. You should know basic math before you start using a calculator. -First, open the polls.py URLconf. It looks like this, according to the tutorial -so far:: +First, open the polls/urls.py URLconf. It looks like this, according to the +tutorial so far:: from django.conf.urls.defaults import * @@ -175,7 +175,7 @@ Change it like so:: 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')), + (r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html')), (r'^(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'), ) @@ -203,7 +203,7 @@ Similarly, the ``object_list`` generic view uses a template called Because we have more than one entry in the URLconf that uses ``object_detail`` for the polls app, we manually specify a template name for the results view: -``template_name='polls/results'``. Otherwise, both views would use the same +``template_name='polls/results.html'``. Otherwise, both views would use the same template. Note that we use ``dict()`` to return an altered dictionary in place. In previous versions of the tutorial, the templates have been provided with a context |
