- def clean_remember_me(self):
- remember = self.cleaned_data['remember_me']
- if not remember and self.request is not None:
- self.request.session.set_expiry(0)
-
- def clean_lt(self):
- lt = self.cleaned_data.get('lt',
- self.initial.get('lt',
- self.fields['lt'].initial()))
- try:
- login_ticket = LoginTicket.objects.get(ticket=lt)
- except:
- raise forms.ValidationError("Login ticket expired. Please try again.")
- else:
- login_ticket.delete()
-