arocks / edge

A Django project skeleton that is modern and cutting edge.
http://django-edge.readthedocs.org/
MIT License
840 stars 247 forks source link

how to customize own User with more fields inside, and how to register it to admin site. #77

Closed HanseyLee closed 6 years ago

HanseyLee commented 6 years ago

hi, I wanna get a customized MyUser by inheriting authtools' AbstractNamedUser(or AbstractEmailUser) cuz i want to add more field to MyUser, such as gender, age etc. so I add MyUser to profiles::models.py, and set it 'swappable = AUTH_USER_MODEL, also change the onetoonefield user of BaseProfile linked to MyUser. is it ok? AND, how can I register MyUser class? I tried to implement something what admin.py in authtools do, but failed. Anyone has a idea? Thx,!

arocks commented 6 years ago

This is covered in the docs https://django-edge.readthedocs.io/en/latest/FAQ/#i-want-to-add-an-extra-field-or-step-to-signup-or-sign-in-process-where-should-i-start