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
Copy file name to clipboardExpand all lines: docs/api-guide/renderers.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -257,7 +257,7 @@ This renderer is used for rendering HTML multipart form data. **It is not suita
257
257
258
258
# Custom renderers
259
259
260
-
To implement a custom renderer, you should override `BaseRenderer`, set the `.media_type` and `.format` properties, and implement the `.render(self, data, media_type=None, renderer_context=None)` method.
260
+
To implement a custom renderer, you should override `BaseRenderer`, set the `.media_type` and `.format` properties, and implement the `.render(self, data, accepted_media_type=None, renderer_context=None)` method.
261
261
262
262
The method should return a bytestring, which will be used as the body of the HTTP response.
263
263
@@ -267,7 +267,7 @@ The arguments passed to the `.render()` method are:
267
267
268
268
The request data, as set by the `Response()` instantiation.
269
269
270
-
### `media_type=None`
270
+
### `accepted_media_type=None`
271
271
272
272
Optional. If provided, this is the accepted media type, as determined by the content negotiation stage.
273
273
@@ -291,7 +291,7 @@ The following is an example plaintext renderer that will return a response with
Note that if a renderer class returns a unicode string, then the response content will be coerced into a bytestring by the `Response` class, with the `charset` attribute set on the renderer used to determine the encoding.
@@ -318,7 +318,7 @@ In some cases you may also want to set the `render_style` attribute to `'binary'
0 commit comments