DjangoOpenInviter
DjangoOpenInviter copied to clipboard
form clean issue?
Hi,
I have got this running - thanks for publishing!
I have had to change line 15 in forms.py to be a form level clean not field level (ie. def clean not def clean_email) it seems that self.cleaned_data['password'] is out of scope if doing clean_email.
This seems a pretty fundamental issue - so I am wondering if my understanding/usage is incorrect?
Guy.
I think the order is probably random, but quite stable. For me it's always working.
It should be refactored to the clean method. The only hard bit is to attach the resulting error to the email field.
Cheers, Thierry
On Tue, Jan 17, 2012 at 10:24 AM, Guy < [email protected]
wrote:
Hi,
I have got this running - thanks for publishing!
I have had to change line 15 in forms.py to be a form level clean not field level (ie. def clean not def clean_email) it seems that self.cleaned_data['password'] is out of scope if doing clean_email.
This seems a pretty fundamental issue - so I am wondering if my understanding/usage is incorrect?
Guy.
Reply to this email directly or view it on GitHub: https://github.com/tschellenbach/DjangoOpenInviter/issues/5
Same issue, the solution is change the name of the method to "clean" only, in forms.py