Small clarification to tutorial03
git-svn-id: http://code.djangoproject.com/svn/django/trunk@198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b20bb2fc26
commit
6fdb7c98e8
|
@ -76,11 +76,11 @@ this::
|
||||||
This is worth a review. When somebody requests a page from your Web site --
|
This is worth a review. When somebody requests a page from your Web site --
|
||||||
say, "/polls/23/", Django will load this Python module, because it's pointed to
|
say, "/polls/23/", Django will load this Python module, because it's pointed to
|
||||||
by the ``ROOT_URLCONF`` setting. It finds the variable named ``urlpatterns``
|
by the ``ROOT_URLCONF`` setting. It finds the variable named ``urlpatterns``
|
||||||
and traverses the regular expressions. When it finds a regular expression that
|
and traverses the regular expressions in order. When it finds a regular
|
||||||
matches -- ``r'^polls/(?P<poll_id>\d+)/$'`` -- it loads the associated Python
|
expression that matches -- ``r'^polls/(?P<poll_id>\d+)/$'`` -- it loads the
|
||||||
package/module: ``myproject.polls.views.polls.detail``. That corresponds to the
|
associated Python package/module: ``myproject.polls.views.polls.detail``. That
|
||||||
function ``detail()`` in ``myproject/polls/views/polls.py``. Finally, it calls
|
corresponds to the function ``detail()`` in ``myproject/polls/views/polls.py``.
|
||||||
that ``detail()`` function like so::
|
Finally, it calls that ``detail()`` function like so::
|
||||||
|
|
||||||
detail(request=<HttpRequest object>, poll_id=23)
|
detail(request=<HttpRequest object>, poll_id=23)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue