Re: Question on OneToOneField

2006-07-19 Thread Aidas Bendoraitis
Although it is an old problem and perhaps some of you already have ways to solve it, I have noticed the same problem just a few hours ago too, and I would like to share with a couple of solutions for that. 1. Use ForeignKey for ONE TO ONE relationship: user = models.ForeignKey(User, unique=True,

Question on OneToOneField

2006-02-21 Thread limodou
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 NUL