Django

Code

Changeset 6947

Show
Ignore:
Timestamp:
12/18/07 21:55:10 (9 months ago)
Author:
adrian
Message:

Edited docs/middleware.txt changes from [6852]

Files:

Legend:

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

    r6874 r6947  
    6262 
    6363  If ``APPEND_SLASH`` is ``True`` and the initial URL doesn't end with a slash, 
    64   and it is not found in urlpatterns, a new URL is formed by appending a slash 
    65   at the end. If this new URL is found in urlpatterns, then an HTTP-redirect is 
    66   returned to this new URL; otherwise the initial URL is processed as usual. 
    67  
    68   So ``foo.com/bar`` will be redirected to ``foo.com/bar/`` if you do not 
    69   have a valid urlpattern for ``foo.com/bar``, and do have a valid urlpattern 
    70   for ``foo.com/bar/``. 
     64  and it is not found in the URLconf, then a new URL is formed by appending a 
     65  slash at the end. If this new URL is found in the URLconf, then Django 
     66  redirects the request to this new URL. Otherwise, the initial URL is 
     67  processed as usual. 
     68 
     69  For example, ``foo.com/bar`` will be redirected to ``foo.com/bar/`` if you 
     70  don't have a valid URL pattern for ``foo.com/bar`` but *do* have a valid 
     71  pattern for ``foo.com/bar/``. 
    7172 
    7273  **New in Django development version:** The behavior of ``APPEND_SLASH`` has 
    73   changed slightly in the development version. It didn't used to check to see 
    74   whether the pattern was matched in the URLconf. 
     74  changed slightly in the development version. It didn't used to check whether 
     75  the pattern was matched in the URLconf. 
    7576 
    7677  If ``PREPEND_WWW`` is ``True``, URLs that lack a leading "www." will be