Django

Code

Changeset 7303

Show
Ignore:
Timestamp:
03/18/08 15:58:39 (7 months ago)
Author:
ubernostrum
Message:

Fixed #6382: Documented request.urlconf

Files:

Legend:

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

    r7294 r7303  
    141141    The raw HTTP POST data. This is only useful for advanced processing. Use 
    142142    ``POST`` instead. 
     143 
     144``urlconf`` 
     145    Not defined by Django itself, but will be read if other code 
     146    (e.g., a custom middleware class) sets it; when present, this will 
     147    be used as the root URLConf for the current request, overriding 
     148    the ``ROOT_URLCONF`` setting. See `How Django processes a 
     149    request`_ for details. 
     150 
     151.. _How Django processes a request: ../url_dispatch/#how-django-processes-a-request 
     152 
    143153 
    144154Methods 
  • django/trunk/docs/settings.txt

    r7294 r7303  
    755755 
    756756A string representing the full Python import path to your root URLconf. For example: 
    757 ``"mydjangoapps.urls"``. See `How Django processes a request`_. 
     757``"mydjangoapps.urls"``. Can be overridden on a per-request basis by 
     758setting the attribute ``urlconf`` on the incoming ``HttpRequest`` 
     759object. See `How Django processes a request`_ for details. 
    758760 
    759761.. _How Django processes a request: ../url_dispatch/#how-django-processes-a-request 
  • django/trunk/docs/url_dispatch.txt

    r7294 r7303  
    3333algorithm the system follows to determine which Python code to execute: 
    3434 
    35     1. Django looks at the ``ROOT_URLCONF`` setting in your `settings file`_. 
    36        This should be a string representing the full Python import path to your 
    37        URLconf. For example: ``"mydjangoapps.urls"``. 
     35    1. Django determines the root URLConf module to use; ordinarily 
     36       this is the value of the ``ROOT_URLCONF`` setting in your 
     37       `settings file`_, but if the incoming ``HttpRequest`` object 
     38       has an attribute called ``urlconf``, its value will be used in 
     39       place of the ``ROOT_URLCONF`` setting. 
    3840    2. Django loads that Python module and looks for the variable 
    3941       ``urlpatterns``. This should be a Python list, in the format returned by