mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-05-05 00:13:43 +03:00
Adding standard renderer attributes and documenting
This commit is contained in:
parent
10d386ec6a
commit
e23d588852
|
@ -317,7 +317,18 @@ class StaticHTMLRenderer(TemplateHTMLRenderer):
|
||||||
|
|
||||||
|
|
||||||
class HTMLFormRenderer(BaseRenderer):
|
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'
|
template = 'rest_framework/form.html'
|
||||||
|
charset = 'utf-8'
|
||||||
|
|
||||||
def data_to_form_fields(self, data):
|
def data_to_form_fields(self, data):
|
||||||
fields = {}
|
fields = {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user