Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当通过 AbstractUser 扩展时,是否可以替换 User 模型的默认用户名字段?
如果我尝试:
USERNAME_FIELD = 'my_custom_field'
在我的扩展模型中,我收到此错误:
TypeError: create_superuser() 当我 syncdb 并创建超级用户时,恰好需要 4 个参数(给定 3 个)。
谢谢!