作为一名功能测试人员,无意中看到一本接口测试的书籍,但在学习用户认证这部分的过程中遇到一些问题,百度也没找到答案,望不吝赐教
源代码如下:REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.ISAuthenticated'
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication'
)
}
报错内容如下:
ImportError: Could not import 'rest_framework.permissions.ISAuthenticated' for API setting 'DEFAULT_PERMISSION_CLASSES'. ImportError: Module "rest_framework.permissions" does not define a "ISAuthenticated" attribute/class.
请问是哪个地方出现问题了呢?