mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 05:04:31 +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):
|
||||
"""
|
||||
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 = {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user