Re: IntegrityError column email is not unique

2016-07-02 Thread M Hashmi
@James As per my understanding I did following. Now it is not adding email if it exists but also its not giving me any error. class GuestCheckoutForm(forms.Form): email = forms.EmailField() email2 = forms.EmailField(label='Verify Email') def clean_email(self): email = self.c

Re: IntegrityError column email is not unique

2016-07-02 Thread M Hashmi
@James As per my understanding I did following. Now it is not adding email if it exists but also its not giving me any error. class GuestCheckoutForm(forms.Form): email = forms.EmailField() email2 = forms.EmailField(label='Verify Email') def clean_email(self): email = self.c

Re: IntegrityError column email is not unique

2016-07-02 Thread M Hashmi
Thanks james for your kind response. Intention is to set a single identifier for guest user account email. If that email exists then user can login or if doesn't he will have to get registered. However let me implement your suggested code and I will respond you back. Thanks again -- You receiv

Re: IntegrityError column email is not unique

2016-07-02 Thread James Schneider
On Jul 2, 2016 7:23 AM, "M Hashmi" wrote: > > I am working on my Checkout view with regular/guest user but getting hard time to come around the integrity error. Idea is to let guest users register with email only to checkout and I need to set the user email unique. > > models.py > > from django.co

IntegrityError column email is not unique

2016-07-02 Thread M Hashmi
I am working on my Checkout view with regular/guest user but getting hard time to come around the integrity error. Idea is to let guest users register with email only to checkout and I need to set the user email unique. models.py *from django.conf import settings from django.db import models