From e23d5888522f98c30418452c0f833cf11589e0c1 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 23 Aug 2013 16:16:41 +0100 Subject: [PATCH] Adding standard renderer attributes and documenting --- rest_framework/renderers.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py index a8670546b..9885c8ddc 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 = {}