mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Do not render HTML output for hidden fields. Closes #2410.
This commit is contained in:
parent
e59b3d1718
commit
4cf03e30ff
|
@ -410,6 +410,9 @@ class HTMLFormRenderer(BaseRenderer):
|
|||
})
|
||||
|
||||
def render_field(self, field, parent_style):
|
||||
if isinstance(field, serializers.HiddenField):
|
||||
return ''
|
||||
|
||||
style = dict(self.default_style[field])
|
||||
style.update(field.style)
|
||||
if 'template_pack' not in style:
|
||||
|
|
Loading…
Reference in New Issue
Block a user