{{cookiecutter.project_slug}}/backend/apps/users/models.py
def _create_user(self, username, email, password, is_staff, is_superuser, **extra_fields):
        """
        Creates and saves a User with the given username, email and password.
        """
        user = self.model(
            username=username,
            email=self.normalize_email(email),
            is_active=True,
            is_staff=is_staff,
            is_superuser=is_superuser,
            last_login=timezone.now(),
            registered_at=timezone.now(),
            **extra_fields,
        )
        user.set_password(password)
        user.save(using=self._db)
        return user

        Creates and saves a User with the given username, email and password.
        
Creates and saves a User with the given username, email and password.
Creates and saves a User with the given username email and password .
def _create_user(self, username, email, password, is_staff, is_superuser, **extra_fields):
        user = self.model(
            username=username,
            email=self.normalize_email(email),
            is_active=True,
            is_staff=is_staff,
            is_superuser=is_superuser,
            last_login=timezone.now(),
            registered_at=timezone.now(),
            **extra_fields,
        )
        user.set_password(password)
        user.save(using=self._db)
        return user
def _create_user ( self , username , email , password , is_staff , is_superuser , ** extra_fields ) : user = self . model ( username = username , email = self . normalize_email ( email ) , is_active = True , is_staff = is_staff , is_superuser = is_superuser , last_login = timezone . now ( ) , registered_at = timezone . now ( ) , ** extra_fields , ) user . set_password ( password ) user . save ( using = self . _db ) return user
Creates and saves a User with the given username, email and password.
Creates and saves a User with the given username email and password .
"""
        Creates and saves a User with the given username, email and password.
        """
self
username
email
password
is_staff
is_superuser