Re: post_save signal to create the new user profile

2009-09-13 Thread Peter Bengtsson
Signals or no signals I think your profile model is wrong. By making it a subclass of User you're effectively getting all the fields of the User model. Write your profile model like this instead: class Employee(models.Model): user = models.ForeginKey(User) address = models.CharField(...)

Re: post_save signal to create the new user profile

2009-09-13 Thread Dmitry Gladkov
Found My mistake, create parent_link: class Employee(User): user = models.OneToOneField(User, parent_link=True) address = models.CharField(max_length=50, null=True, blank=True) phone1 = models.CharField(max_length=15, null=True, blank=True) phone2 =

post_save signal to create the new user profile

2009-09-13 Thread Dmitry Gladkov
Hi! I've got user profile, that uses multi-table inheritance: class Employee(User): address = models.CharField(max_length=50, null=True, blank=True) phone1 = models.CharField(max_length=15, null=True, blank=True) phone2 = models.CharField(max_length=15, null=True, blank=True)