HINT: Add or change a related_name argument to the definition for 'usersApp.

 

 

错误原因是你的项目使用的不是Django自带的用户表,采用的自定义的用户表,这个时候需要在settings.py里面进行指定。

AUTH_USER_MODEL = 'usersApp.UserProfile' # usersApp是app名,UserProfile是models中的类名
posted @ 2022-10-13 21:01  侬侬发  阅读(162)  评论(0编辑  收藏  举报