📜  django rest DjangoModelPermissions include get - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:19.738000             🧑  作者: Mango

代码示例1
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']