rest_framework setting

 

REST_FRAMEWORK = {
# version
'DEFAULT_VERSIONING_CLASS':'rest_framework.versioning.URLPathVersioning',
'DEFAULT_VERSION':'v1',
'ALLOWED_VERSIONS':['v1','v2'],
'VERSION_PARAM':'version',
#parser, for more see rest_framework.parsers
'DEFAULT_PARSER_CLASSES':['rest_framework.parsers.JSONParser','rest_framework.parsers.FormParser'],
#renderer
'DEFAULT_RENDERER_CLASSES':['rest_framework.renderers.JSONRenderer','rest_framework.renderers.BrowsableAPIRenderer'],

}
posted @ 2018-09-03 23:41  EngineTang  阅读(249)  评论(0编辑  收藏  举报