I'm following along this tutorial. I added the "REST_FRAMEWORK" object how they describe in settings.py
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_simplejwt.authentication.JWTAuthentication',
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
),
}
I get this error after running command py manage.py runserver
. Any help is greatly appreciated.
You put 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema'
into the 'DEFAULT_AUTHENTICATION_CLASSES'
tuple.
How to fix:
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework_simplejwt.authentication.JWTAuthentication'
],
# out of DEFAULT_AUTHENTICATION_CLASSES
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema'
}