code: def init_form(self, values=None):
          
          if values:
              values = values.copy()
              values['lt'] = self.request.session['lt'][-1]
          form_initial = {
              'service': self.service,
              'method': self.method,
              'warn': (
                  self.warn or self.request.session.get("warn") or self.request.COOKIES.get('warn')
              ),
              'lt': self.request.session['lt'][-1],
              'renew': self.renew
          }
          if settings.CAS_FEDERATE:
              if self.username and self.ticket:
                  form_initial['username'] = self.username
                  form_initial['password'] = self.ticket
                  form_initial['ticket'] = self.ticket
                  self.form = forms.FederateUserCredential(
                      values,
                      initial=form_initial
                  )
              else:
                  self.form = forms.FederateSelect(values, initial=form_initial)
          else:
              self.form = forms.UserCredential(
                  values,
                  initial=form_initial
              )
docs: Initialization of the good form depending of POST and GET parameters
  
              :param django.http.QueryDict values: A POST or GET QueryDict