1 2 3 4 5 6
from rest_framework import permissions class IsOwnerOrReadOnly(permissions.BasePermission): """ Custom permission to only allow owners/authors of the object to edit it. """