A lot of this is me trying to find out why it's failing. The problem
I'm getting is that there is a FullProfile associated with the email
address. When i go through the steps in the shell it works perfectly.
When I run it through the form it throws an error. If you look at the
custom ValidationError I am checking to see if I can get an error to
spit out any information for that profile that is being submitted in
the form.

Each time I get the error to return the test information without fail.
If I do try to submit an address that isn't in the FullProfile table
then I get a different DoesNotExist error, it jumps right over the
custom validation error.

So the custom ValidationError triggers when there is a profile in the
DB and the default debug page DoesNotExist triggers when there isn't a
FulLProfile associated with the email address.

On Jul 7, 12:42 pm, Nuno Maltez <nuno.li...@gmail.com> wrote:
> At a glance:
>
> >        try:
> >            FullProfile.objects.get(email=email)
> >        except FullProfile.DoesNotExist:
>
> >         test =
> > FullProfile.objects.get(email=self.cleaned_data['email'])
> >         raise forms.ValidationError("%s" % (test))
>
> Shouldn't the second FullProfile.objects.get just raise a
> FullProfile.DoesNotExist eception again? It seems you're just catching
> an exception in order to throw it again in the except block...
>
> hth,
> Nuno

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to