Clean up form rendering

This commit is contained in:
jeremystretch
2021-12-28 10:22:00 -05:00
parent 4075cc8518
commit e0319cc894
3 changed files with 22 additions and 16 deletions

View File

@@ -29,7 +29,7 @@
</div>
{% endif %}
<form action="" method="post" enctype="multipart/form-data" class="form-object-edit">
<form action="" method="post" enctype="multipart/form-data" class="form-object-edit mt-5">
{% csrf_token %}
{% block form %}
@@ -47,7 +47,11 @@
<h5 class="offset-sm-3">{{ group }}</h5>
</div>
{% for name in fields %}
{% render_field form|getfield:name %}
{% with field=form|getfield:name %}
{% if not field.field.widget.is_hidden %}
{% render_field field %}
{% endif %}
{% endwith %}
{% endfor %}
</div>
{% endfor %}