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 1
1
import os
2
2
3
- from rest_framework import VERSION as DRFVERSION
4
-
5
- drf_version = tuple (int (x ) for x in DRFVERSION .split ('.' ))
6
-
7
3
SITE_ID = 1
8
4
DEBUG = True
9
5
93
89
'rest_framework.renderers.BrowsableAPIRenderer' ,
94
90
),
95
91
'DEFAULT_METADATA_CLASS' : 'rest_framework_json_api.metadata.JSONAPIMetadata' ,
92
+ 'DEFAULT_SCHEMA_CLASS' : 'rest_framework_json_api.schemas.openapi.AutoSchema' ,
96
93
'DEFAULT_FILTER_BACKENDS' : (
97
94
'rest_framework_json_api.filters.OrderingFilter' ,
98
95
'rest_framework_json_api.django_filters.DjangoFilterBackend' ,
104
101
),
105
102
'TEST_REQUEST_DEFAULT_FORMAT' : 'vnd.api+json'
106
103
}
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