List Info

Thread: overiding the clean method on newforms




overiding the clean method on newforms
country flaguser name
United States
2007-07-30 03:08:06
Hi,

is there any sample on over riding the clean method of the
newforms?

Thanks
james


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: overiding the clean method on newforms
country flaguser name
United States
2007-07-30 12:41:21
I found the forms from James Bennett's Django Registation
app helpful
when I was first learning newforms.

http://django-registration.googlecode.c
om/svn/trunk/registration/forms.py

- whiteinge

On Jul 30, 2:08 am, james_027 <cai.hai...gmail.com> wrote:
> Hi,
>
> is there any sample on over riding the clean method of
the newforms?
>
> Thanks
> james


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: overiding the clean method on newforms
country flaguser name
United States
2007-07-30 21:31:33
Hi,


>
> http://django-registration.googlecode.co
m/svn/trunk/registration/form...
>

Thanks Nathaniel, I am looking for over riding the clean()
instead of
clean_xxxx(). After hours of experiments. I would like to
confirm if
my learnings are correct.

in over riding the clean() method, I have to first check if
the
attribute I want to check on is available on the
cleaned_data
dictionary, if not I will not proceed to my validation, if
yes then
proceed to my custom validation.  All the Validation I raise
in the
clean() method will be recorded on the _errors dictionary?

Thanks
james


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )