diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-06-18 13:32:12 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-06-18 13:32:12 +0000 |
| commit | 457a1f9a031543e3d5d1cfb3944712fe71ebba2f (patch) | |
| tree | 7fc7d26068ae4d15b9bb32c5c0216a55b762d0a9 /docs/intro/tutorial03.txt | |
| parent | bc362cc6b81386d36f078a741e38f00b67fd4f8d (diff) | |
Fixed #11272 -- Made some clarifications to the overview and tutorial. Thanks to jjinux for the review notes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/intro/tutorial03.txt')
| -rw-r--r-- | docs/intro/tutorial03.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt index 867b7d1224..77c54c2e43 100644 --- a/docs/intro/tutorial03.txt +++ b/docs/intro/tutorial03.txt @@ -71,7 +71,7 @@ For more on :class:`~django.http.HttpRequest` objects, see the :ref:`ref-request-response`. For more details on URLconfs, see the :ref:`topics-http-urls`. -When you ran ``python django-admin.py startproject mysite`` at the beginning of +When you ran ``django-admin.py startproject mysite`` at the beginning of Tutorial 1, it created a default URLconf in ``mysite/urls.py``. It also automatically set your :setting:`ROOT_URLCONF` setting (in ``settings.py``) to point at that file:: @@ -98,8 +98,7 @@ This is worth a review. When somebody requests a page from your Web site -- say, the :setting:`ROOT_URLCONF` setting. It finds the variable named ``urlpatterns`` and traverses the regular expressions in order. When it finds a regular expression that matches -- ``r'^polls/(?P<poll_id>\d+)/$'`` -- it loads the -associated Python package/module: ``mysite.polls.views.detail``. That -corresponds to the function ``detail()`` in ``mysite/polls/views.py``. Finally, +function ``detail()`` from ``mysite/polls/views.py``. Finally, it calls that ``detail()`` function like so:: detail(request=<HttpRequest object>, poll_id='23') @@ -486,7 +485,8 @@ Here's what happens if a user goes to "/polls/34/" in this system: further processing. Now that we've decoupled that, we need to decouple the 'mysite.polls.urls' -URLconf by removing the leading "polls/" from each line:: +URLconf by removing the leading "polls/" from each line, and removing the +lines registering the admin site:: urlpatterns = patterns('mysite.polls.views', (r'^$', 'index'), |
