How to override default user model field in Django?

前端 未结 1 574
孤独总比滥情好
孤独总比滥情好 2021-02-09 23:38

The problem is the default User model does not have some very useful options given to the fields e.g unique=True to the email field.

I read this questio

1条回答
  •  伪装坚强ぢ
    2021-02-09 23:58

    There's this already asked... How to make email field unique in model User from contrib.auth in Django

    Also the django method of additional user data is here http://docs.djangoproject.com/en/dev/topics/auth/#auth-profiles .

    I'm not entirely a fan of this method and appreciate where you are coming from, but sometimes you have to go with the herd.

    0 讨论(0)
提交回复
热议问题