【发布时间】:2013-02-02 01:34:37
【问题描述】:
我是 django 的新手。我使用 django User 和 2 个扩展表(profile_table、more_table),每个表都与 User 具有一对一的关系。所以在models.py下,我有2个类(一个用于profile_table,另一个用于more_table)。当我创建一个新用户时,我会将基本数据插入到 auth_user 表中,并将其他信息插入到 profile_talbe 和 more_table 中。如何以及在何处构建此插入方法?我应该使用班级管理器吗?或覆盖保存功能?或者在 profile_table 类下创建一个类方法?
谢谢
【问题讨论】: