Skip to content

Commit e3c7a51

Browse files
committed
missed another DRF 3.9 deprecation
1 parent e4c28fc commit e3c7a51

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

example/settings/dev.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import os
22

3-
from rest_framework import VERSION as DRFVERSION
4-
5-
drf_version = tuple(int(x) for x in DRFVERSION.split('.'))
6-
73
SITE_ID = 1
84
DEBUG = True
95

@@ -93,6 +89,7 @@
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',
@@ -104,6 +101,3 @@
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'

0 commit comments

Comments
 (0)