diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/class-based-views/base.txt | 9 | ||||
| -rw-r--r-- | docs/releases/6.1.txt | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/ref/class-based-views/base.txt b/docs/ref/class-based-views/base.txt index 887a83b37f..2d745b5e98 100644 --- a/docs/ref/class-based-views/base.txt +++ b/docs/ref/class-based-views/base.txt @@ -277,6 +277,15 @@ ancestor classes are documented under the section title of **Ancestors then the query string is discarded. By default, ``query_string`` is ``False``. + .. attribute:: preserve_request + + .. versionadded:: 6.1 + + Whether to preserve the HTTP method and body during the redirect. If + ``True``, then the redirect will use status code 307 instead of 302, + or 308 instead of 301 when :attr:`permanent` is ``True``. By default, + ``preserve_request`` is ``False``. + **Methods** .. method:: get_redirect_url(*args, **kwargs) diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index dd2a193589..8f7172256e 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -334,7 +334,9 @@ Forms Generic Views ~~~~~~~~~~~~~ -* ... +* The new :attr:`.RedirectView.preserve_request` attribute allows preserving + the HTTP method and body during redirects, using 307/308 status codes instead + of 302/301. Internationalization ~~~~~~~~~~~~~~~~~~~~ |
