Hello, I have a sign in form and a lost password form. Currently in my clean method in the sign in form I got :
user = authenticate(username=self.cleaned_data['login'], password=self.cleaned_data['password']) In my view, when my form is valid I need to log the user in so I use login() but it requires a user object. I have 2 ideas but I don't know which one is safe or safer : 1) put self.user instead of user in the clean method and then in the view do login(request, myform.user). => don't know if this is safe to add variables with self in a form. 2) put login() directly in the form clean method instead of the view. => seems a little strange to write it there. I have question with my lost password form since I need to set a new password which also requires a user object and then use send_mail(). How would you do it ? Thanks in advance, Nolhian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.