Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在settings.py中全局设置默认身份验证为IsAuthenticated,但我仍然可以访问django rest framework中的端点_Django_Python 3.x_Django Rest Framework - Fatal编程技术网

在settings.py中全局设置默认身份验证为IsAuthenticated,但我仍然可以访问django rest framework中的端点

在settings.py中全局设置默认身份验证为IsAuthenticated,但我仍然可以访问django rest framework中的端点,django,python-3.x,django-rest-framework,Django,Python 3.x,Django Rest Framework,我已在settings.py文件中将默认身份验证类设置为IsAuthenticated Global,但仍然可以访问端点。可能是什么问题?下面是settings.py文件中Django rest框架的配置 REST_FRAMEWORK = { 'DEFAULT_PERMISSION_CLASSESS': [ 'rest_framework.permissions.IsAuthenticated', ], 'DEFAULT_AUTHENTICATION_CL

我已在settings.py文件中将默认身份验证类设置为IsAuthenticated Global,但仍然可以访问端点。可能是什么问题?下面是settings.py文件中Django rest框架的配置

REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSESS': [
        'rest_framework.permissions.IsAuthenticated',
    ],
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'liquor.authentication.JSONWebTokenAuthentication',
    ),

    'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
    'DEFAULT_PARSER_CLASSES': [
        'rest_framework.parsers.FormParser',
        'rest_framework.parsers.MultiPartParser',
        'rest_framework.parsers.JSONParser',
    ],
    'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],
    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
    'PAGE_SIZE':100,
    'DEFAULT_RENDERER_CLASSESS': (
        'rest_framework.renderers.JSONRenderer',
        'rest_framework.renderers.BrowsableAPIRenderer',
    ),

}

DEFAULT\u PERMISSION\u CLASSES
中的拼写错误应该是
DEFAULT\u PERMISSION\u CLASSES