I saw django.contrib.auth.User, the default user model, already has a field for email.
When i want to create a new user in Django however, using the django admin panel, all it asks for is a username, password and a password confirmation.
Is there a way that allows me to make the existing field show up in django’s admin panel? Is there some kind of modeladmin for django’s default user model i can override somewhere?
At first i tried making an entirely custom user model with a manytomanyfield called emailadres, which was an emailfield. If the existing users email field can be made visible however that would save a lot of work.
I should clarify, that i need this field when creating a new user. Not after
You can unregister the provided ModelAdmin class and register your own.
You can create a Proxy Model for User and create a ModelAdmin class for it.
In either of these two cases, you could subclass django.auth.admin.UserAdmin and modify those elements you wish to change.
[Edit: You may also wish to do some research to see if you can find out why it was done that way. There is a chance that there’s a very good reason why it’s set up like that. You might want to find out what problems you may create by changing it. I personally don’t know any, but that doesn’t mean they don’t exist.]
Or:
You can create your own “User creation” form and view and use it.