Re: handling IntegrityError: Duplicate entry in UserCreationForm

2013-04-29 Thread isachin
orms.ValidationError(("FIELD VALUE already exist")) On Sat, Apr 27, 2013 at 6:41 PM, isachin wrote: > @ Kelly: thank you very much for pointing me to django's source code. > > Yes I got that validation done and applied the same code for validation. > Below is the snippet

Re: handling IntegrityError: Duplicate entry in UserCreationForm

2013-04-27 Thread isachin
@ Kelly: thank you very much for pointing me to django's source code. Yes I got that validation done and applied the same code for validation. Below is the snippet : profile.serial_num = self.cleaned_data['phone_num'] try: profile._default_manager.get(phone_num=profile.seri

Re: handling IntegrityError: Duplicate entry in UserCreationForm

2013-04-25 Thread isachin
Thanx Siddharth and Pradeep, I will try both suggestion and let you know On Thu, Apr 25, 2013 at 2:07 PM, Pradeep Kumar wrote: > Hi Sachin, > > If you have added the unique=True later and migrated the existing table, I > would also suggest you to first clean up the NULL and duplicate entries >

Re: djano user registration form and login(full example)

2013-04-17 Thread isachin
Thanx, Btw, I solved it by creating an instance of get_profile() and then saving user and profile separately. here is the code snippet of *forms.py* if commit: profile = user.get_profile() profile.serial_num = self.cleaned_data['serial_num'] profile.save() user.sa