正在经历由simplejwt框架引起的错误。
ModuleNotFoundError: No module named 'rest_framework_simplejwt.token_blacklistauthentication'
我想将使用过的刷新令牌(刷新后)黑名单上的.The simplejwt工作得很好,但似乎有一个问题是由以下原因引起的:
'rest_framework_simplejwt.token_blacklist'
以下是我的rest_framework吐露:
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated',
],
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.SessionAuthentication',
'rest_framework_simplejwt.authentication.JWTAuthentication',
]
}
发布于 2022-08-20 10:58:15
你试过这个吗?
pip install --upgrade djangorestframework-simplejwt
我的问题是
ModuleNotFoundError:没有名为“rest_framework_simplejwt”的模块
错误出现在djangorestframework-simplejwt的版本中,或者您可以在Simplejwt.authentication.JWTAuthentication的上阅读更多内容。
发布于 2022-03-02 15:45:21
您必须将“黑名单”应用程序安装在安装的应用程序中:
INSTALLED_APPS = ['rest_framework_simplejwt.token_blacklist', ...]
文档解释它:黑名单应用程序。
https://stackoverflow.com/questions/71194736
复制相似问题