Hello,
I need to write form for re-setting user's password:

class SettingsForm(forms.Form):
     old_password = forms.CharField(max_length=200, required=False, 
widget=forms.PasswordInput(attrs=passw_dict, render_value=False), 
label=u'Actual password')
     password1 = forms.CharField(max_length=200, required=False, 
widget=forms.PasswordInput(attrs=passw_dict, render_value=False), 
label=u'New password')
     password2 = forms.CharField(max_length=200, required=False, 
widget=forms.PasswordInput(attrs=passw_dict, render_value=False), 
label=u'New password (again)')

I would like check old user password at form validation level. But is it 
possible? (I have no request object, so I don't know which user is 
actually logged in).

I could check it in view level too, but I would like to generate form 
error message (ie. invoke ValidationError exceprion outside of the form 
class). Is it possible please?


Regards
Michal


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to