且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Django REST框架创建用户 - 不进行身份验证

更新时间: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