File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 11import os
22
3- from rest_framework import VERSION as DRFVERSION
4-
5- drf_version = tuple (int (x ) for x in DRFVERSION .split ('.' ))
6-
73SITE_ID = 1
84DEBUG = True
95
9389 'rest_framework.renderers.BrowsableAPIRenderer' ,
9490 ),
9591 'DEFAULT_METADATA_CLASS' : 'rest_framework_json_api.metadata.JSONAPIMetadata' ,
92+ 'DEFAULT_SCHEMA_CLASS' : 'rest_framework_json_api.schemas.openapi.AutoSchema' ,
9693 'DEFAULT_FILTER_BACKENDS' : (
9794 'rest_framework_json_api.filters.OrderingFilter' ,
9895 'rest_framework_json_api.django_filters.DjangoFilterBackend' ,
104101 ),
105102 'TEST_REQUEST_DEFAULT_FORMAT' : 'vnd.api+json'
106103}
107-
108- if drf_version >= (3 , 10 ):
109- REST_FRAMEWORK ['DEFAULT_SCHEMA_CLASS' ] = 'rest_framework_json_api.schemas.openapi.AutoSchema'
You can’t perform that action at this time.
0 commit comments