Open BFMarks opened 5 years ago
add this to the settings.py file
REST_FRAMEWORK = { ... 'DEFAULT_PERMISSION_CLASSES': ( 'rest_framework.permissions.IsAdminUser', ), ... }
write " permission_classes " in a pair square bracket [ ] not in () permission_classes = [permissions.IsAuthenticatedOrReadOnly]
Even i was getting this issue and observed that i missed to add comma in last, since i am using tuple (). To fix this issue either we can user like this permission_classes = [permissions.IsAuthenticatedOrReadOnly] or permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
Keep getting this error when trying to do basic logic outside of authentication or authorization. Py3.7 and Django 2.1