app/core/models.py
def create_user(self, email, password=None, **extra_fields):
        """ Creates and saves a new user"""

        if not email: 
            raise ValueError("created new user must have email address indicated!")

        user = self.model(email=self.normalize_email(email), **extra_fields) # .normalize_email() comes from BaseUserManager
        user.set_password(password) #comes encrypted from AbstractBaseUser
        user.save(using=self._db)

        return user
 Creates and saves a new user
Creates and saves a new user
Creates and saves a new user
def create_user(self, email, password=None, **extra_fields):
        if not email: 
            raise ValueError("created new user must have email address indicated!")
        user = self.model(email=self.normalize_email(email), **extra_fields) 
        user.set_password(password) 
        user.save(using=self._db)
        return user
def create_user ( self , email , password = None , ** extra_fields ) : if not email : raise ValueError ( "created new user must have email address indicated!" ) user = self . model ( email = self . normalize_email ( email ) , ** extra_fields ) user . set_password ( password ) user . save ( using = self . _db ) return user
Creates and saves a new user
Creates and saves a new user
""" Creates and saves a new user""" # .normalize_email() comes from BaseUserManager #comes encrypted from AbstractBaseUser
self
email
password