Django

Code

Changeset 198

Show
Ignore:
Timestamp:
07/19/05 00:52:06 (3 years ago)
Author:
adrian
Message:

Small clarification to tutorial03

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/tutorial03.txt

    r197 r198  
    7777say, "/polls/23/", Django will load this Python module, because it's pointed to 
    7878by the ``ROOT_URLCONF`` setting. It finds the variable named ``urlpatterns`` 
    79 and traverses the regular expressions. When it finds a regular expression that 
    80 matches -- ``r'^polls/(?P<poll_id>\d+)/$'`` -- it loads the associated Python 
    81 package/module: ``myproject.polls.views.polls.detail``. That corresponds to the 
    82 function ``detail()`` in ``myproject/polls/views/polls.py``. Finally, it calls 
    83 that ``detail()`` function like so:: 
     79and traverses the regular expressions in order. When it finds a regular 
     80expression that matches -- ``r'^polls/(?P<poll_id>\d+)/$'`` -- it loads the 
     81associated Python package/module: ``myproject.polls.views.polls.detail``. That 
     82corresponds to the function ``detail()`` in ``myproject/polls/views/polls.py``. 
     83Finally, it calls that ``detail()`` function like so:: 
    8484 
    8585    detail(request=<HttpRequest object>, poll_id=23)