我使用这个代码https://github.com/jcugat/django-custom-user以电子邮件地址登录。不过,我希望添加联系电话,名字和姓氏的程序,它在扩展EmailUser模型下声明
我在model.py中的class下面添加了联系电话
class MyCustomEmailUser(AbstractEmailUser):
"""
Example of an EmailUser with a new field date_of_birth
"""
contact_number = models.CharField(blank=False,max_length=10)
我在admin.py中将MyCustomEmailUserAdmin类留空
class MyCustomEmailUserAdmin(EmailUserAdmin):
"""
You can customize the interface of your model here.
"""
pass
当我登录到管理面板,在用户下,我只看到电子邮件地址,输入密码和重新输入密码的形式添加用户。我看不到有联系电话,你知道我该怎么办吗
目前没有回答
相关问题 更多 >
编程相关推荐