aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/renderers.py
diff options
context:
space:
mode:
authorTom Christie2012-10-17 14:42:16 -0700
committerTom Christie2012-10-17 14:42:16 -0700
commitbbd3728da615f688da6a5276c6a898990275f32c (patch)
tree1566a18e4b4ad03a094c2c630b57d1530a9245d7 /rest_framework/renderers.py
parent6717d654d0bbfdfca4aaea84a5b4814c4e5f7567 (diff)
parentfb56f215ae50da0aebe99e05036ece259fd3e6f1 (diff)
downloaddjango-rest-framework-bbd3728da615f688da6a5276c6a898990275f32c.tar.bz2
Merge pull request #303 from tomchristie/parser_refactor
Parser refactor
Diffstat (limited to 'rest_framework/renderers.py')
-rw-r--r--rest_framework/renderers.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py
index 94d253c9..23fd961b 100644
--- a/rest_framework/renderers.py
+++ b/rest_framework/renderers.py
@@ -1,9 +1,10 @@
"""
-Renderers are used to serialize a View's output into specific media types.
+Renderers are used to serialize a response into specific media types.
-Django REST framework also provides HTML and PlainText renderers that help self-document the API,
-by serializing the output along with documentation regarding the View, output status and headers,
-and providing forms and links depending on the allowed methods, renderers and parsers on the View.
+They give us a generic way of being able to handle various media types
+on the response, such as JSON encoded data or HTML output.
+
+REST framework also provides an HTML renderer the renders the browseable API.
"""
import string
from django import forms
@@ -23,8 +24,8 @@ from rest_framework import serializers, parsers
class BaseRenderer(object):
"""
- All renderers must extend this class, set the :attr:`media_type` attribute,
- and override the :meth:`render` method.
+ All renderers should extend this class, setting the `media_type`
+ and `format` attributes, and override the `.render()` method.
"""
media_type = None