django rest-framework
2018-05-02 本文已影响0人
王大碗要努力
1、inistall djangorestframework
2、settings配置
INSTALLED_APPS = [
'core',
'rest_framework'
]
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly',
),
# 'DEFAULT_FILTER_BACKENDS': (
# 'django_filters.rest_framework.DjangoFilterBackend',
# )
}