from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView

Viewed 19

modules present in requirements.txt

asgiref==3.5.2
backports.zoneinfo==0.2.1 
Django==4.0.5
djangorestframework==3.13.1 
djangorestframework-simplejwt==5.2.0 
PyJWT==2.5.0
pytz==2022.2.1
sqlparse==0.4.2

configuration in setting.py

REST_FRAMEWORK = {

        'DEFAULT_AUTHENTICATION_CLASS': 
             ['rest_framework_simplejwt.authentication.JWTAuthentication',],
                 }

After having all proper configuration when i try to import the simplejwt views it is not resolved.

   from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
1 Answers

Try to mark the Project Directory as source root directory and in pycharm or ide ignore the unresolved error. It will run

Related