Edited docs/middleware.txt changes from [6852]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
48a5898f24
commit
76f3856039
|
@ -61,17 +61,18 @@ Adds a few conveniences for perfectionists:
|
|||
settings.
|
||||
|
||||
If ``APPEND_SLASH`` is ``True`` and the initial URL doesn't end with a slash,
|
||||
and it is not found in urlpatterns, a new URL is formed by appending a slash
|
||||
at the end. If this new URL is found in urlpatterns, then an HTTP-redirect is
|
||||
returned to this new URL; otherwise the initial URL is processed as usual.
|
||||
and it is not found in the URLconf, then a new URL is formed by appending a
|
||||
slash at the end. If this new URL is found in the URLconf, then Django
|
||||
redirects the request to this new URL. Otherwise, the initial URL is
|
||||
processed as usual.
|
||||
|
||||
So ``foo.com/bar`` will be redirected to ``foo.com/bar/`` if you do not
|
||||
have a valid urlpattern for ``foo.com/bar``, and do have a valid urlpattern
|
||||
for ``foo.com/bar/``.
|
||||
For example, ``foo.com/bar`` will be redirected to ``foo.com/bar/`` if you
|
||||
don't have a valid URL pattern for ``foo.com/bar`` but *do* have a valid
|
||||
pattern for ``foo.com/bar/``.
|
||||
|
||||
**New in Django development version:** The behavior of ``APPEND_SLASH`` has
|
||||
changed slightly in the development version. It didn't used to check to see
|
||||
whether the pattern was matched in the URLconf.
|
||||
changed slightly in the development version. It didn't used to check whether
|
||||
the pattern was matched in the URLconf.
|
||||
|
||||
If ``PREPEND_WWW`` is ``True``, URLs that lack a leading "www." will be
|
||||
redirected to the same URL with a leading "www."
|
||||
|
|
Loading…
Reference in New Issue