code: def get(self, request):
          
          next_page = request.GET.get('next')
  
          # try to find the ticket matching current session for logout signal
          try:
              st = SessionTicket.objects.get(session_key=request.session.session_key)
              ticket = st.ticket
          except SessionTicket.DoesNotExist:
              ticket = None
          # send logout signal
          cas_user_logout.send(
              sender="manual",
              user=request.user,
              session=request.session,
              ticket=ticket,
          )
          auth_logout(request)
          # clean current session ProxyGrantingTicket and SessionTicket
          ProxyGrantingTicket.objects.filter(session_key=request.session.session_key).delete()
          SessionTicket.objects.filter(session_key=request.session.session_key).delete()
          next_page = next_page or get_redirect_url(request)
          if settings.CAS_LOGOUT_COMPLETELY:
              protocol = get_protocol(request)
              host = request.get_host()
              redirect_url = urllib_parse.urlunparse(
                  (protocol, host, next_page, '', '', ''),
              )
              client = get_cas_client(request=request)
              return HttpResponseRedirect(client.get_logout_url(redirect_url))
          else:
              # This is in most cases pointless if not CAS_RENEW is set. The user will
              # simply be logged in again on next request requiring authorization.
              return HttpResponseRedirect(next_page)
docs: Redirects to CAS logout page
  
          :param request:
          :return: