Installation
Quick Installation
pip install drf-iam
Project Configuration
Add
drf_iamto yourINSTALLED_APPSinsettings.py:
INSTALLED_APPS = [
...
'drf_iam',
]
Add the Role relationship to your User model:
from django.contrib.auth.models import AbstractUser
from drf_iam.models import Role
class User(AbstractUser):
role = models.ForeignKey(Role, on_delete=models.SET_NULL, null=True)