【发布时间】:2011-02-22 07:36:36
【问题描述】:
我定义了一个class UserProfile,它将默认的user 作为外键。
现在另一个class A 有一个指向UserProfile 的外键。
因此,为了保存 A 类中的任何实例,我如何给它 userprofile 对象。
另外,创建class UserProfile 是否意味着class user 仍在使用而class UserProfile 只是其他表?
我需要知道这一点,因为我必须处理用户配置文件的创建,所以我应该知道什么存储在哪里?
-- 困惑
【问题讨论】:
-
我应该为
class user本身创建一个外键吗?
标签: django django-models django-authentication django-users