You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`format` - A string representing the output format. If not specified, the `DATETIME_FORMAT` setting will be used, which defaults to `'iso8601'`.
203
-
*`input_formats` - A list of strings representing the input formats which may be used to parse the date. If not specified, the `DATETIME_INPUT_FORMATS` setting will be used, which defaults to `['iso8601']`.
202
+
*`format` - A string representing the output format. If not specified, the `DATETIME_FORMAT` setting will be used, which defaults to `'iso-8601'`.
203
+
*`input_formats` - A list of strings representing the input formats which may be used to parse the date. If not specified, the `DATETIME_INPUT_FORMATS` setting will be used, which defaults to `['iso-8601']`.
204
204
205
-
DateTime format strings may either be [python strftime formats][strftime] which explicitly specifiy the format, or the special string `'is8601'`, which indicates that [ISO 8601][iso8601] style datetimes should be used. (eg `'2013-01-29T12:34:56.000000'`)
205
+
DateTime format strings may either be [python strftime formats][strftime] which explicitly specifiy the format, or the special string `'iso-8601'`, which indicates that [ISO 8601][iso8601] style datetimes should be used. (eg `'2013-01-29T12:34:56.000000'`)
206
206
207
207
## DateField
208
208
@@ -212,10 +212,10 @@ Corresponds to `django.db.models.fields.DateField`
*`format` - A string representing the output format. If not specified, the `DATE_FORMAT` setting will be used, which defaults to `'iso8601'`.
216
-
*`input_formats` - A list of strings representing the input formats which may be used to parse the date. If not specified, the `DATE_INPUT_FORMATS` setting will be used, which defaults to `['iso8601']`.
215
+
*`format` - A string representing the output format. If not specified, the `DATE_FORMAT` setting will be used, which defaults to `'iso-8601'`.
216
+
*`input_formats` - A list of strings representing the input formats which may be used to parse the date. If not specified, the `DATE_INPUT_FORMATS` setting will be used, which defaults to `['iso-8601']`.
217
217
218
-
Date format strings may either be [python strftime formats][strftime] which explicitly specifiy the format, or the special string `'is8601'`, which indicates that [ISO 8601][iso8601] style dates should be used. (eg `'2013-01-29'`)
218
+
Date format strings may either be [python strftime formats][strftime] which explicitly specifiy the format, or the special string `'iso-8601'`, which indicates that [ISO 8601][iso8601] style dates should be used. (eg `'2013-01-29'`)
219
219
220
220
## TimeField
221
221
@@ -227,10 +227,10 @@ Corresponds to `django.db.models.fields.TimeField`
*`format` - A string representing the output format. If not specified, the `TIME_FORMAT` setting will be used, which defaults to `'iso8601'`.
231
-
*`input_formats` - A list of strings representing the input formats which may be used to parse the date. If not specified, the `TIME_INPUT_FORMATS` setting will be used, which defaults to `['iso8601']`.
230
+
*`format` - A string representing the output format. If not specified, the `TIME_FORMAT` setting will be used, which defaults to `'iso-8601'`.
231
+
*`input_formats` - A list of strings representing the input formats which may be used to parse the date. If not specified, the `TIME_INPUT_FORMATS` setting will be used, which defaults to `['iso-8601']`.
232
232
233
-
Time format strings may either be [python strftime formats][strftime] which explicitly specifiy the format, or the special string `'is8601'`, which indicates that [ISO 8601][iso8601] style times should be used. (eg `'12:34:56.000000'`)
233
+
Time format strings may either be [python strftime formats][strftime] which explicitly specifiy the format, or the special string `'iso-8601'`, which indicates that [ISO 8601][iso8601] style times should be used. (eg `'12:34:56.000000'`)
Copy file name to clipboardExpand all lines: docs/api-guide/settings.md
+68-36Lines changed: 68 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,11 @@ The `api_settings` object will check for any user-defined settings, and otherwis
34
34
35
35
# API Reference
36
36
37
-
## DEFAULT_RENDERER_CLASSES
37
+
## API policy settings
38
+
39
+
*The following settings control the basic API policies, and are applied to every `APIView` class based view, or `@api_view` function based view.*
40
+
41
+
#### DEFAULT_RENDERER_CLASSES
38
42
39
43
A list or tuple of renderer classes, that determines the default set of renderers that may be used when returning a `Response` object.
40
44
@@ -45,7 +49,7 @@ Default:
45
49
'rest_framework.renderers.BrowsableAPIRenderer',
46
50
)
47
51
48
-
## DEFAULT_PARSER_CLASSES
52
+
####DEFAULT_PARSER_CLASSES
49
53
50
54
A list or tuple of parser classes, that determines the default set of parsers used when accessing the `request.DATA` property.
51
55
@@ -57,7 +61,7 @@ Default:
57
61
'rest_framework.parsers.MultiPartParser'
58
62
)
59
63
60
-
## DEFAULT_AUTHENTICATION_CLASSES
64
+
####DEFAULT_AUTHENTICATION_CLASSES
61
65
62
66
A list or tuple of authentication classes, that determines the default set of authenticators used when accessing the `request.user` or `request.auth` properties.
*The following settings control the behavior of the generic class based views.*
102
+
103
+
#### DEFAULT_MODEL_SERIALIZER_CLASS
94
104
95
105
A class that determines the default type of model serializer that should be used by a generic view if `model` is specified, but `serializer_class` is not provided.
The filter backend class that should be used for generic filtering. If set to `None` then generic filtering is disabled.
108
118
109
-
## PAGINATE_BY
119
+
####PAGINATE_BY
110
120
111
121
The default page size to use for pagination. If set to `None`, pagination is disabled by default.
112
122
113
123
Default: `None`
114
124
115
-
## PAGINATE_BY_PARAM
125
+
####PAGINATE_BY_PARAM
116
126
117
127
The name of a query parameter, which can be used by the client to overide the default page size to use for pagination. If set to `None`, clients may not override the default page size.
118
128
119
129
Default: `None`
120
130
121
-
## UNAUTHENTICATED_USER
131
+
---
132
+
133
+
## Authentication settings
134
+
135
+
*The following settings control the behavior of unauthenticated requests.*
136
+
137
+
#### UNAUTHENTICATED_USER
122
138
123
139
The class that should be used to initialize `request.user` for unauthenticated requests.
Copy file name to clipboardExpand all lines: docs/topics/release-notes.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ You can determine your currently installed version using `pip freeze`:
42
42
43
43
### Master
44
44
45
-
* Support for custom input and output formats for `DateField`, `DateTimeField` and `TimeField`
45
+
* Support for custom input and output formats for `DateField`, `DateTimeField` and `TimeField`.
46
46
* Cleanup: Request authentication is no longer lazily evaluated, instead authentication is always run, which results in more consistent, obvious behavior. Eg. Supplying bad auth credentials will now always return an error response, even if no permissions are set on the view.
47
47
* Bugfix for serializer data being uncacheable with pickle protocol 0.
0 commit comments