在 django 表单中如何在表单类中添加锚标记而不自定义 form.html
表格.py
class HealthCheckerForm(PortalModelForm):
name = forms.CharField(max_length=128,required = False ,help_text="Enter Name", label='Name')
description = forms.CharField(max_length=128, required = False, label='desc*')
age = forms.CharField(max_length=128,required = False ,help_text="Enter age", label='age')
group = forms.CharField(max_length=128, required = False, label='group*')
表单.html
{% for field in form %}
<div class="fieldWrapper">
<div class="fieldInfo">
{{ field.label_tag }}{{ field }}
<span class="errorList">{{ field.errors|striptags}}</span>
</div>
</div>
{% endfor %}
无需自定义 form.html 如何添加按钮或锚标记
提前致谢..