1:在models.py中导入user表

2:创建UserProfile,具体如下:

3:一一对应关联user表

4:modles映射到数据库表格

5:在admin.py中注册UserProfile

6:创建django的信号道,在user表创建或者保存时,自动创建userprofile中的信息

1:在models.py中导入user表
2:创建UserProfile,具体如下:
3:一一对应关联user表
4:modles映射到数据库表格
5:在admin.py中注册UserProfile
6:创建django的信号道,在user表创建或者保存时,自动创建userprofile中的信息