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

2013-04-17 Thread sachin
Hello again, In extended auth user model, is there any *way to handle unique fields with django forms*. Lets say I have model like: class UserProfile(models.Model): user = models.OneToOneField(User) phone_num = models.BigIntegerField(null=True, unique=True) def __unicode__(self):

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

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

2013-04-16 Thread Avnesh Shakya
This error is occur when you're saving the member, not the user. When creating the member, you are not assigning the user. On Wed, Apr 17, 2013 at 10:45 AM, sachin wrote: > I m still stuck with > > Exception Type: IntegrityError > Exception Value: column user_id is not unique > > Whenev

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

2013-04-16 Thread sachin
I m still stuck with Exception Type: IntegrityError Exception Value: column user_id is not unique Whenever I try to save, it throws the above error. I have attached files for reference, can someone help ?? On Saturday, April 6, 2013 7:07:32 PM UTC+5:30, sachin wrote: > > Thanx Shawn,

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

2013-04-07 Thread Thomas Rega
Am 06.04.2013 um 16:30 schrieb Shawn Milochik: > I've seen some situations where it looked like signals are received multiple > times. > > However, you can easily fix that by checking for the existence of the user in > your function, or a try/except that handles the integrity error. or by usa

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

2013-04-06 Thread Shawn Milochik
I've seen some situations where it looked like signals are received multiple times. However, you can easily fix that by checking for the existence of the user in your function, or a try/except that handles the integrity error. Also, if you're starting a new project, consider upgrading to Django 1

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

2013-04-06 Thread sachin
Thanx Shawn, * * UserCreationForm really helped. Now I have a different problem, I'm trying to add custom feilds to *auth user *using storing-additional-information-about-users . But now I m getting th

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

2013-04-01 Thread Alexis Roda
Al 01/04/13 21:11, En/na sachin ha escrit: Hello, I'm just starting with Django. I want to create a user registration form which will take input like username, password, first and last name, email, address etc. using the same information I want to send a conformation mail to user and authenticat

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

2013-04-01 Thread Shawn Milochik
Don't even worry about factories. They're for when you want a bunch of forms for the same model on the page at once. Use the UserCreationForm in django.contrib.auth.forms. It only accepts a username and password, so you can either subclass it to add the fields or make your own form and add it to y

djano user registration form and login(full example)

2013-04-01 Thread sachin
Hello, I'm just starting with Django. I want to create a user registration form which will take input like username, password, first and last name, email, address etc. using the same information I want to send a conformation mail to user and authenticate her/him. I have read Django docs, from