Skip to content

Commit 1ce84f8

Browse files
slivercn2ygk
authored andcommitted
Adjust depreaction warning to state to move to JSON_API_FORMAT_FIELD_NAMES (#507)
Changelog entry was correct so not adding a new one to add only noise.
1 parent 56b5fd7 commit 1ce84f8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

example/settings/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
ROOT_URLCONF = 'example.urls_test'
1111

12-
JSON_API_FIELD_NAMES = 'camelize'
12+
JSON_API_FORMAT_FIELD_NAMES = 'camelize'
1313
JSON_API_FORMAT_TYPES = 'camelize'
1414
JSON_API_PLURALIZE_TYPES = True
1515

rest_framework_json_api/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def format_keys(obj, format_type=None):
133133
134134
`format_keys` function and `JSON_API_FORMAT_KEYS` setting are deprecated and will be
135135
removed in the future.
136-
Use `format_field_names` and `JSON_API_FIELD_NAMES` instead. Be aware that
136+
Use `format_field_names` and `JSON_API_FORMAT_FIELD_NAMES` instead. Be aware that
137137
`format_field_names` only formats keys and preserves value.
138138
139139
Takes either a dict or list and returns it with camelized keys only if
@@ -144,7 +144,7 @@ def format_keys(obj, format_type=None):
144144
warnings.warn(
145145
"`format_keys` function and `JSON_API_FORMAT_KEYS` setting are deprecated and will be "
146146
"removed in the future. "
147-
"Use `format_field_names` and `JSON_API_FIELD_NAMES` instead. Be aware that "
147+
"Use `format_field_names` and `JSON_API_FORMAT_FIELD_NAMES` instead. Be aware that "
148148
"`format_field_names` only formats keys and preserves value.",
149149
DeprecationWarning
150150
)

0 commit comments

Comments
 (0)