              return resolve_url(self.next_page)
          elif settings.LOGOUT_REDIRECT_URL:
              return resolve_url(settings.LOGOUT_REDIRECT_URL)
          else:
              return None
  
      def get_success_url(self):
          next_page = self.get_default_redirect_url()
  
          if (
 
</s> remove         next_page = self.get_default_redirect_url()

        if (
            self.redirect_field_name in self.request.POST
            or self.redirect_field_name in self.request.GET
        ):
            next_page = self.get_redirect_url()
            if next_page == "":
                if settings.LOGOUT_REDIRECT_URL:
                    next_page = resolve_url(settings.LOGOUT_REDIRECT_URL)
                else:
                    next_page = self.request.path
        return next_page
 </s> add         return self.get_redirect_url() or self.get_default_redirect_url() </s> remove         """Return the default redirect URL, or None if no URL is configured."""
 </s> add         """Return the default redirect URL.""" </s> remove         self.assertRedirects(response, "/logout/", fetch_redirect_response=False)
 </s> add         self.assertContains(response, "Logged out")
        self.confirm_logged_out() </s> remove         if redirect_to:
            # Redirect to this page until the session has been cleared.
 </s> add         if redirect_to != request.get_full_path():
            # Redirect to target page once the session has been cleared.
            return self.request.path
              return resolve_url(self.next_page)
          elif settings.LOGOUT_REDIRECT_URL:
              return resolve_url(settings.LOGOUT_REDIRECT_URL)
          else:
            return self.request.path
  
      def get_success_url(self):
          next_page = self.get_default_redirect_url()
  
          if (
keep keep keep keep replace keep keep keep keep keep
 Simplified LogoutView.get_success_url().

This preserves the behavior of redirecting to the logout URL without
query string parameters when an insecure ?next=... parameter is given.

It changes the behavior of a POST to the logout URL, as shown by the
test that is changed. Currently, this results in a GET to the logout
URL. However, such GET requests are deprecated. This change would be
necessary in Django 5.0 anyway. This commit merely anticipates it. 
django/contrib/auth/views.py