Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django rest DjangoModelPermissions include get

class CustomDjangoModelPermission(permissions.DjangoModelPermissions):

    def __init__(self):
        self.perms_map = copy.deepcopy(self.perms_map)  # from EunChong's answer
        self.perms_map['GET'] = ['%(app_label)s.view_%(model_name)s']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #rest #DjangoModelPermissions #include
ADD COMMENT
Topic
Name
5+1 =