Cannot apply DjangoModelPermissionsOrAnonReadOnly on a view that does not set `.queryset` or have a `.get_queryset()` method.
这个问题是在使用 django REST 做自定义认证的时候出现的
解决方法是 在settings.py 中注释掉这个
REST_FRAMEWORK={
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly',
]
}

浙公网安备 33010602011771号