'ModuleNotFoundError: No module named 'rest_framework_simplejwt.token_blacklistauthentication'

Am experiencing this error caused by the simplejwt framework.

ModuleNotFoundError: No module named 'rest_framework_simplejwt.token_blacklistauthentication'

i want to blacklist used refresh tokens(after refresh).The simplejwt works perfectly but it seems there is an issue caused by:

'rest_framework_simplejwt.token_blacklist'

here are my rest_framework configs:

REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': [
        'rest_framework.permissions.IsAuthenticated', 
     ],
      'DEFAULT_AUTHENTICATION_CLASSES': [
        'rest_framework.authentication.SessionAuthentication',
        'rest_framework_simplejwt.authentication.JWTAuthentication',
    ]

}



Solution 1:[1]

You have to put the 'Blacklist' app in installed apps:

INSTALLED_APPS = ['rest_framework_simplejwt.token_blacklist', ...]

The documentation explain it: Blacklisted app.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jony_23