更新时间:2022-06-20 21:56:52
添加休息框架认证设置,还有以下内容
Add rest framework authentication setting with following also
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
)
参考 http://www.django-rest-framework.org/ api-guide / authentication /#sessionauthentication
而对于令牌自动化,请通过doc http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication
And for token autentication go through doc http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication