It seems that I cannot define two and more OneToOneFields in a model. If I do so, then as I install the app, django will complain that:
CREATE TABLE "user_profile_userprofile" ( "user_id" integer NOT NULL PRIMARY KEY, "portrait" varchar(100) NOT NULL, "blog_setting_id" integer NOT NULL PRIMARY KEY REFERENCES "user_profile_blogprofile" ("id") ); SQL error: table "user_profile_userprofile" has more than one primary key The model definition is : class UserProfile(models.Model): user = models.OneToOneField(User) portrait = models.ImageField(_('Photo'), upload_to='photo', blank=True) joined_groups = models.ManyToManyField(UserGroup, blank=True) blog_setting = models.OneToOneField(BlogProfile) Is it a bug or a limit? Should I change OneToOneField to ForeignField? -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---