aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/settings.md
blob: c7bae30d10c46efa6d8600e97ab9db73982fa2ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Settings

Settings for REST framework are all namespaced in the `API_SETTINGS` setting.
For example your project's `settings.py` file might look like this:

    API_SETTINGS = {
        'DEFAULT_RENDERERS': (
            'djangorestframework.renderers.JSONRenderer',
            'djangorestframework.renderers.YAMLRenderer',
        )
        'DEFAULT_PARSERS': (
            'djangorestframework.parsers.JSONParser',
            'djangorestframework.parsers.YAMLParser',
        )
    }

## DEFAULT_RENDERERS

A list or tuple of renderer classes.

Default:

    (
    'djangorestframework.renderers.JSONRenderer',
    'djangorestframework.renderers.DocumentingHTMLRenderer')`

## DEFAULT_PARSERS

A list or tuple of parser classes.

Default: `()`