aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/renderers.py
diff options
context:
space:
mode:
authorTom Christie2013-08-23 16:16:41 +0100
committerTom Christie2013-08-23 16:16:41 +0100
commite23d5888522f98c30418452c0f833cf11589e0c1 (patch)
tree51bbf9b44fa35d8cb448e2a0ad86a214688ed0be /rest_framework/renderers.py
parent10d386ec6a4822402b5ffea46bdd9e7d72db519b (diff)
downloaddjango-rest-framework-e23d5888522f98c30418452c0f833cf11589e0c1.tar.bz2
Adding standard renderer attributes and documenting
Diffstat (limited to 'rest_framework/renderers.py')
-rw-r--r--rest_framework/renderers.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py
index a8670546..9885c8dd 100644
--- a/rest_framework/renderers.py
+++ b/rest_framework/renderers.py
@@ -317,7 +317,18 @@ class StaticHTMLRenderer(TemplateHTMLRenderer):
class HTMLFormRenderer(BaseRenderer):
+ """
+ Renderers serializer data into an HTML form.
+
+ If the serializer was instantiated without an object then this will
+ return an HTML form not bound to any object,
+ otherwise it will return an HTML form with the appropriate initial data
+ populated from the object.
+ """
+ media_type = 'text/html'
+ format = 'form'
template = 'rest_framework/form.html'
+ charset = 'utf-8'
def data_to_form_fields(self, data):
fields = {}