You need to edit your settings.py and add this :
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAdminUser'
),
}
But have look for better insight https://www.django-rest-framework.org/api-guide/settings/
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments