ajax请求出现: {"detail":"CSRF Failed: CSRF token missing or incorrect."} setting.py: # REST_FRAMEWORK配置 REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework.authentication.TokenAuthentication', ) }
ajax请求出现: {"detail":"CSRF Failed: CSRF token missing or incorrect."} setting.py: # REST_FRAMEWORK配置 REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework.authentication.TokenAuthentication', ) }