Re: Newforms validations & request.user

2007-08-10 Thread Collin Grady
Makes the most sense to me :) --~--~-~--~~~---~--~~ 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

Re: Newforms validations & request.user

2007-08-09 Thread Kai Kuehne
Hi, On 8/9/07, Collin Grady <[EMAIL PROTECTED]> wrote: > > Add an __init__ function to your form that you can pass request to. > > def __init__(self, request=None, *args, **kwargs): > self.request = request > super(MyForm, self).__init__(*args, **kwargs) > > Something like

Re: Newforms validations & request.user

2007-08-09 Thread Collin Grady
Add an __init__ function to your form that you can pass request to. def __init__(self, request=None, *args, **kwargs): self.request = request super(MyForm, self).__init__(*args, **kwargs) Something like that should work to add request to the form, and you can then use it in

Newforms validations & request.user

2007-08-09 Thread Michal
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 =