Skip to content

Commit 5f3f2ef

Browse files
rpkilbylovelydinosaur
authored andcommitted
Add note that APISettings is an internal class (#7144)
1 parent 442a206 commit 5f3f2ef

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

rest_framework/settings.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,19 @@ def import_from_string(val, setting_name):
182182

183183
class APISettings:
184184
"""
185-
A settings object, that allows API settings to be accessed as properties.
186-
For example:
185+
A settings object that allows REST Framework settings to be accessed as
186+
properties. For example:
187187
188188
from rest_framework.settings import api_settings
189189
print(api_settings.DEFAULT_RENDERER_CLASSES)
190190
191191
Any setting with string import paths will be automatically resolved
192192
and return the class, rather than the string literal.
193+
194+
Note:
195+
This is an internal class that is only compatible with settings namespaced
196+
under the REST_FRAMEWORK name. It is not intended to be used by 3rd-party
197+
apps, and test helpers like `override_settings` may not work as expected.
193198
"""
194199
def __init__(self, user_settings=None, defaults=None, import_strings=None):
195200
if user_settings:

0 commit comments

Comments
 (0)