          else:
              return None
  
      def get_success_url(self):
          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
  
      def get_context_data(self, **kwargs):
          context = super().get_context_data(**kwargs)
          current_site = get_current_site(self.request)
          context.update(
 
</s> remove             return None
 </s> add             return self.request.path </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.get_redirect_url() or self.get_default_redirect_url()
          else:
              return None
  
      def get_success_url(self):
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
        return self.get_redirect_url() or self.get_default_redirect_url()
  
      def get_context_data(self, **kwargs):
          context = super().get_context_data(**kwargs)
          current_site = get_current_site(self.request)
          context.update(
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace 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