diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2010-09-11 03:13:23 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2010-09-11 03:13:23 +0000 |
| commit | fffe0a00a383f46fdfb8de44d56f8ae2e2ee09de (patch) | |
| tree | 53d854c5e2221ae8b8b352a9ac673ba7e2b2c81c /docs | |
| parent | 04f50c1f281e1864576dc6ff5f4d89b562f82b6d (diff) | |
Add option to redirect_to view to allow passing along the query string
from the original request. Default is current behaviour, which is not to
pass the query string (it often won't be appropriate to do so).
Thanks to steingrd@ifi.uio.no for the patch and tests. Fixed #9966.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/generic-views.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/generic-views.txt b/docs/ref/generic-views.txt index 65f0d2eb30..a7d67c74e3 100644 --- a/docs/ref/generic-views.txt +++ b/docs/ref/generic-views.txt @@ -88,9 +88,15 @@ If the given URL is ``None``, Django will return an ``HttpResponseGone`` (410). redirect will use status code 301. If ``False``, then the redirect will use status code 302. By default, ``permanent`` is ``True``. + * ``query_string``: Whether to pass along the GET query string to + the new location. If ``True``, then the query string is appended + to the URL. If ``False``, then the query string is discarded. By + default, ``query_string`` is ``False``. + .. versionadded:: 1.1 The ``permanent`` keyword argument is new in Django 1.1. + **Example:** This example issues a permanent redirect (HTTP status code 301) from |
