I want to add a field in my module to give the user some
permissions like is_superuser
field. But how can i do this with customize permission?
class CustomUser(AbstractUser):
username = models.CharField(max_length=100,unique=True)
email = models.EmailField(_('email address'), unique=True)
image = models.ImageField(default='default.jpg', upload_to='profile_pics ')
date_joined = models.DateTimeField(_('date joined'),default=timezone.now)
is_active = models.BooleanField(default=True)
is_admin = models.BooleanField(default=False)
is_staff = models.BooleanField(default=False)
USERNAME_FIELD = 'username'
REQUIRED_FIELDS = ['email']
objects = CustomUserManager()