That worked perfectly and makes a lot more sense. Thanks!
On Mon, Sep 26, 2011 at 4:05 PM, Shawn Milochik wrote:
> if User.objects.filter(email = data['email']).exists()
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this g
if User.objects.filter(email = data['email']).exists()
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@go
I'm trying to check if a user with a specified email already exists.
According to the docs, it's better to use the .exists() method.
I tried this:
if User.objects.exists(email = data['email']):
raise forms.ValidationError(u'Email Already Exists')
However, I get this error:
exists() got an u
3 matches
Mail list logo