发现匿名用户问题

验证部分出现问题,django封装性比较高,如果使用rest_framework框架,并且使用JWT进行用户验证, 检查配置文件中是否添加验证JWT的配置

'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',


原文地址:https://www.cnblogs.com/wangdongpython/p/10835075.html