summaryrefslogtreecommitdiff
path: root/docs/tutorial04.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-01-11 05:07:38 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-01-11 05:07:38 +0000
commit8013f76a40270283f9d3c04160ac9b8a72ffe2be (patch)
tree7b7626286b882c3622d341ab6d1e56c4e0083607 /docs/tutorial04.txt
parent8f42a9246580dc11e8c1975eb364816495ba488c (diff)
magic-removal: Merged to [1903]
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/tutorial04.txt')
-rw-r--r--docs/tutorial04.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/tutorial04.txt b/docs/tutorial04.txt
index 7acb1343eb..f6a0abb6d1 100644
--- a/docs/tutorial04.txt
+++ b/docs/tutorial04.txt
@@ -44,9 +44,9 @@ 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 that
included this line::
- (r'^polls/(?P<poll_id>\d+)/vote/$', 'myproject.apps.polls.views.vote'),
+ (r'^polls/(?P<poll_id>\d+)/vote/$', 'myproject.polls.views.vote'),
-So let's create a ``vote()`` function in ``myproject/apps/polls/views.py``::
+So let's create a ``vote()`` function in ``myproject/polls/views.py``::
from django.core.extensions import get_object_or_404, render_to_response
from django.models.polls import choices, polls
@@ -158,7 +158,7 @@ so far::
from django.conf.urls.defaults import *
- urlpatterns = patterns('myproject.apps.polls.views',
+ urlpatterns = patterns('myproject.polls.views',
(r'^$', 'index'),
(r'^(?P<poll_id>\d+)/$', 'detail'),
(r'^(?P<poll_id>\d+)/results/$', 'results'),
@@ -178,7 +178,7 @@ Change it like so::
(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<poll_id>\d+)/vote/$', 'myproject.apps.polls.views.vote'),
+ (r'^(?P<poll_id>\d+)/vote/$', 'myproject.polls.views.vote'),
)
We're using two generic views here: ``object_list`` and ``object_detail``.