7 lines
193 B
Python
7 lines
193 B
Python
from rest_framework.permissions import BasePermission, SAFE_METHODS
|
|
|
|
|
|
class ReadOnly(BasePermission):
|
|
def has_permission(self, request, view):
|
|
return request.method in SAFE_METHODS
|