module documentation

Settings for REST framework are all namespaced in the REST_FRAMEWORK setting. For example your project's `settings.py` file might look like this: REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': [ 'rest_framework.renderers.JSONRenderer', 'rest_framework.renderers.TemplateHTMLRenderer', ], 'DEFAULT_PARSER_CLASSES': [ 'rest_framework.parsers.JSONParser', 'rest_framework.parsers.FormParser', 'rest_framework.parsers.MultiPartParser', ], } This module provides the `api_setting` object, that is used to access REST framework settings, checking for user settings first, then falling back to the defaults.

Class APISettings A settings object that allows REST Framework settings to be accessed as properties. For example:
Function import_from_string Attempt to import a class from a string representation.
Function perform_import If the given setting is a string import notation, then perform the necessary import or imports.
Function reload_api_settings Undocumented
Constant DEFAULTS Undocumented
Constant IMPORT_STRINGS Undocumented
Constant REMOVED_SETTINGS Undocumented
Variable api_settings Undocumented
def import_from_string(val, setting_name): (source)

Attempt to import a class from a string representation.

def perform_import(val, setting_name): (source)

If the given setting is a string import notation, then perform the necessary import or imports.

def reload_api_settings(*args, **kwargs): (source)

Undocumented

DEFAULTS = (source)

Undocumented

Value
{'DEFAULT_RENDERER_CLASSES': ['rest_framework.renderers.JSONRenderer',
                              'rest_framework.renderers.BrowsableAPIRenderer'],
 'DEFAULT_PARSER_CLASSES': ['rest_framework.parsers.JSONParser',
                            'rest_framework.parsers.FormParser',
                            'rest_framework.parsers.MultiPartParser'],
 'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.SessionAuthen
tication',
...
IMPORT_STRINGS: list[str] = (source)

Undocumented

Value
['DEFAULT_RENDERER_CLASSES',
 'DEFAULT_PARSER_CLASSES',
 'DEFAULT_AUTHENTICATION_CLASSES',
 'DEFAULT_PERMISSION_CLASSES',
 'DEFAULT_THROTTLE_CLASSES',
 'DEFAULT_CONTENT_NEGOTIATION_CLASS',
 'DEFAULT_METADATA_CLASS',
...
REMOVED_SETTINGS: list[str] = (source)

Undocumented

Value
['PAGINATE_BY', 'PAGINATE_BY_PARAM', 'MAX_PAGINATE_BY']
api_settings = (source)

Undocumented