profiles_api/models.py
def create_superuser(self, email, name, password):
        """Create and save a new superuser with given details"""
        user = self.create_user(email, name, password)

        user.is_superuser = True        # is_superuser created by PermissionsMixin
        user.is_staff = True
        user.save(using=self._db)

        return user
Create and save a new superuser with given details
Create and save a new superuser with given details
Create and save a new superuser with given details
def create_superuser(self, email, name, password):
        user = self.create_user(email, name, password)
        user.is_superuser = True        
        user.is_staff = True
        user.save(using=self._db)
        return user
def create_superuser ( self , email , name , password ) : user = self . create_user ( email , name , password ) user . is_superuser = True user . is_staff = True user . save ( using = self . _db ) return user
Create and save a new superuser with given details
Create and save a new superuser with given details
"""Create and save a new superuser with given details""" # is_superuser created by PermissionsMixin
self
email
name
password