I am trying to set up OAuth2 authentication system for my Django REST API (using DjangoRestFramework and Django-Oauth-Toolkit). I wrote everything according to the official documentation, but the system gives error "could not import ext.rest_framework"
Here is my setting.py file:
OAUTH2_PROVIDER = {
# this is the list of available scopes
'SCOPES': {'read': 'Read scope', 'write': 'Write scope', 'groups': 'Access to your groups'}
}
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'oauth2_provider.ext.rest_framework.OAuth2Authentication',
],
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',),
'PAGE_SIZE': 10
}
Thanks!