From b907a4448572e3c48137e983248fb7411246563a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 18 Nov 2013 15:50:29 +0000 Subject: Remove .html suffixes --- api-guide/renderers.html | 91 ++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 45 deletions(-) (limited to 'api-guide/renderers.html') diff --git a/api-guide/renderers.html b/api-guide/renderers.html index 8077c804..11b0e161 100644 --- a/api-guide/renderers.html +++ b/api-guide/renderers.html @@ -4,6 +4,7 @@
The set of valid renderers for a view is always defined as a list of classes. When a view is entered REST framework will perform content negotiation on the incoming request, and determine the most appropriate renderer to satisfy the request.
The basic process of content negotiation involves examining the request's Accept header, to determine which media types it expects in the response. Optionally, format suffixes on the URL may be used to explicitly request a particular representation. For example the URL http://example.com/api/users_count.json might be an endpoint that always returns JSON data.
For more information see the documentation on content negotiation.
+For more information see the documentation on content negotiation.
The default set of renderers may be set globally, using the DEFAULT_RENDERER_CLASSES setting. For example, the following settings would use YAML as the main media type and also include the self describing API.
REST_FRAMEWORK = {
@@ -309,7 +310,7 @@ def user_count_view(request, format=None):
JSONPRenderer
Renders the request data into JSONP. The JSONP media type provides a mechanism of allowing cross-domain AJAX requests, by wrapping a JSON response in a javascript callback.
The javascript callback function must be set by the client including a callback URL query parameter. For example http://example.com/api/users?callback=jsonpCallback. If the callback function is not explicitly set by the client it will default to 'callback'.
-Note: If you require cross-domain AJAX requests, you may want to consider using the more modern approach of CORS as an alternative to JSONP. See the CORS documentation for more details.
+Note: If you require cross-domain AJAX requests, you may want to consider using the more modern approach of CORS as an alternative to JSONP. See the CORS documentation for more details.
.media_type: application/javascript
.format: '.jsonp'
.charset: utf-8
@@ -388,7 +389,7 @@ def simple_html_view(request):
return JSONRenderer()
This renderer is used for rendering HTML multipart form data. It is not suitable as a response renderer, but is instead used for creating test requests, using REST framework's test client and test request factory.
+This renderer is used for rendering HTML multipart form data. It is not suitable as a response renderer, but is instead used for creating test requests, using REST framework's test client and test request factory.
.media_type: multipart/form-data; boundary=BoUnDaRyStRiNg
.format: '.multipart'
.charset: utf-8