Tuesday, June 21, 2011

Re: syncdb doesn't create UserProfile table

On Sat, Jun 18, 2011 at 8:27 AM, Kenneth Gonsalves
<lawgon@thenilgiris.com> wrote:
> On Thu, 2011-06-16 at 12:13 +0100, Tom Evans wrote:
>> On Thu, Jun 16, 2011 at 11:55 AM, Kenneth Gonsalves
>> <lawgon@thenilgiris.com> wrote:
>> > those entries are old. The point is that the built in
>> User.get_profile()
>> > only works with onetoone. The difference is in the reverse lookup.
>>
>> That is not correct.
>>
>> It will still work perfectly with ForeignKey(unique=True),
>
> the docs say one2one
>

That doesn't negate my statement.

You said that User.get_profile() will only work with OneToOneField,
which is incorrect, it will also work with ForeignKey(unique=True).
New code should always use OneToOneField though.

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate