From da6567da7ea0e844c9a880e02c7b34e1a184edf8 Mon Sep 17 00:00:00 2001 From: VAIBHAVPANT07 Date: Sat, 25 Apr 2026 00:15:19 +0530 Subject: Fixed #37062 -- Added preserve_request support to RedirectView. --- docs/ref/class-based-views/base.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/ref') 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) -- cgit v1.3