Re: Query raises a DoesNotExist error

2010-07-08 Thread Tom Evans
On Wed, Jul 7, 2010 at 6:22 PM, Nick wrote: > I am working on a form to resend an account activation email for newly > registered users who did not receive their first email. > > The form is currently raising a DoesNotExist error and I can't figure > out why: > > Here is the activation code: > > c

Re: Query raises a DoesNotExist error

2010-07-07 Thread Nick
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 ValidationErro

Re: Query raises a DoesNotExist error

2010-07-07 Thread Nuno Maltez
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

Re: Query raises a DoesNotExist error

2010-07-07 Thread Bill Freeman
My bet is that FullProfile.objects.get is raising the error because there is no profile with that email address. You might expect this to be caught by the "try" and raise a validation error instead, but since you have no "except" clause, its not going to happen. On Wed, Jul 7, 2010 at 1:22 PM, Ni

Query raises a DoesNotExist error

2010-07-07 Thread Nick
I am working on a form to resend an account activation email for newly registered users who did not receive their first email. The form is currently raising a DoesNotExist error and I can't figure out why: Here is the activation code: class resend_activation(forms.Form): email = forms.EmailF