djangorestframework-simplejwt not working

514 views Asked by At

I'm following a Udemy Course with user administration and I need to install this

pip install djangorestframework-simplejwt

After its installed, I need to add this to settings.py

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (   
        'rest_framework_simplejwt.authentication.JWTAuthentication',
    )
}

But its gives me this error

ImportError: Could not import 'rest_framework_simplejwt.authentication.JWTAuthentication' for API setting 'DEFAULT_AUTHENTICATION_CLASSES'. ModuleNotFoundError: No module named 'pkg_resources'.

So far I haven't been been able to find anything on google

1

There are 1 answers

0
Tanveer On
INSTALLED_APPS = [
    ...
    'rest_framework_simplejwt',
    ...
]

It should be added in INSTALLED_APPS

Source: https://django-rest-framework-simplejwt.readthedocs.io/en/latest/getting_started.html