code: def post(self, request, *args, **kwargs):
          
          # initialize class parameters
          self.init_post(request)
          # process the POST request
          ret = self.process_post()
          if ret == self.INVALID_LOGIN_TICKET:
              messages.add_message(
                  self.request,
                  messages.ERROR,
                  _(u"Invalid login ticket, please try to log in again")
              )
          elif ret == self.USER_LOGIN_OK:
              # On successful login, update the :class:`models.User<cas_server.models.User>` ``date``
              # attribute by saving it. (``auto_now=True``)
              self.user = models.User.objects.get_or_create(
                  username=self.request.session['username'],
                  session_key=self.request.session.session_key
              )[0]
              self.user.last_login = timezone.now()
              self.user.save()
          elif ret == self.USER_LOGIN_FAILURE:  # bad user login
              if settings.CAS_FEDERATE:
                  self.ticket = None
                  self.username = None
                  self.init_form()
              # preserve valid LoginTickets from session flush
              lt = self.request.session.get('lt', [])
              # On login failure, flush the session
              self.logout()
              # restore valid LoginTickets
              self.request.session['lt'] = lt
          elif ret == self.USER_ALREADY_LOGGED:
              pass
          else:  # pragma: no cover (should no happen)
              raise EnvironmentError("invalid output for LoginView.process_post")
          # call the GET/POST common part
          response = self.common()
          if self.warn:
              utils.set_cookie(
                  response,
                  "warn",
                  "on",
                  10 * 365 * 24 * 3600
              )
          else:
              response.delete_cookie("warn")
          return response
docs: method called on POST request on this view
  
              :param django.http.HttpRequest request: The current request object