How to i add custom permissions in django rest framework

i wanted to ask can we use model level permissions from django in django rest-framework or do we have to create custom permission differently for django rest-framework.

 permission = Permission.objects.get(codename = 'is_seller')

the above code to add permission when a form is submitted is not adding the permission and is showing the error that user_permission does not have a object add()

Back to Top