DjangoOpenInviter icon indicating copy to clipboard operation
DjangoOpenInviter copied to clipboard

form clean issue?

Open guyf opened this issue 13 years ago • 2 comments

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.

guyf avatar Jan 17 '12 09:01 guyf

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

tschellenbach avatar Jan 17 '12 09:01 tschellenbach

Same issue, the solution is change the name of the method to "clean" only, in forms.py

arielcamino avatar Aug 09 '12 21:08 arielcamino