code: def process_exception(self, request, exception):
          
  
          if isinstance(exception, CasTicketException):
              do_logout(request)
              # This assumes that request.path requires authentication.
              return HttpResponseRedirect(request.path)
          else:
              return None
docs: When we get a CasTicketException, that is probably caused by the ticket timing out.
          So logout/login and get the same page again.