noDelete.py 219 Bytes
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
2
3
4
5
6
7
8
9
10
from rest_framework.permissions import BasePermission


class NoDelete(BasePermission):

    def has_permission(self, request, view):
        if request.method == 'DELETE':
            return False

        return True