使用 Django Rest Framework 时,遇到报错:
Cannot apply DjangoModelPermissionsOrAnonReadOnly on a view that does not set `.queryset` or have a `.get_queryset()` method.
将 setting.py文件的权限检查配置注释了,这个问题就没了
# 'DEFAULT_PERMISSION_CLASSES': [ # 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' # ],