User registration and login in django

I want users of our platform to log in using their email addresses. For the registration form, I would like to include the following fields: Username, Email, Phone, Number, Password, Repeat Password, Location, and Address. We want all users to be created using the above fields. I know this can be done using the AbstractUser Model, but how? I mean how can I do this? All the stack Overflow questions I have search on internet wasn’t doing this.

Aside from the docs at Substituting a custom user model, the best way to understand everything needing to be done is to study the existing AbstractUser model along with understanding everything that happens in the UserAdmin class in django.contrib.auth.admin.

There is a number of ways of how to achieve this, even without sub-classing the user model.

However, you can look at how I used django-allauth and extended the sign up form with additional attributes in my starter kit (GitHub - stribny/sidewinder: Django starter kit that focuses on good defaults, developer experience, and deployment.). For example, here is a sign up form collecting additional attributes sidewinder/ at master · stribny/sidewinder · GitHub.