简体   繁体   中英

How do I create user registration for a AbstractUser?

Since Django recommends having a custom user model for a new project, I've extended the AbstractUser model without adding any additional fields, but how do I create a signup page for new users with my new user model?

My model:

from django.contrib.auth.models import AbstractUser

class User(AbstractUser):
    pass

After creating customer model you have to build registration form. you can check out this video he explained it well. Also you can add additional fields AbstractBaseUser and UserCreationForm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM