I created a custom user and add permission is_driver
to check whether my user belongs to Driver's Group
.
class CustomUser(AbstractUser):
mobile = models.CharField(max_length=16)
address = models.CharField(max_length=100)
class Meta:
permissions = (
("is_driver", "Can access driver's page")
)
But when I run manage.py makemigrations
and then manage.py migrate
, it throws an error: ValueError: too many values to unpack
.
I'm new to permissions, maybe there is some other way to add permissions to a Group
. What's wrong?