Django BooleanField不显示标签

Django BooleanField不显示标签,django,django-forms,django-crispy-forms,Django,Django Forms,Django Crispy Forms,我正在摆弄Django表单和Django Crispy表单(使用Bootstrap作为我的主题)。我定义了两个字段: test1 = forms.BooleanField(label='Some label here', help_text='help text here') 及 呈现表单时,test2字段显示如下标签: another label: <input box> 有没有办法让它显示得更像: Some label here [] help text here 谢谢 我

我正在摆弄Django表单和Django Crispy表单(使用Bootstrap作为我的主题)。我定义了两个字段:

test1 = forms.BooleanField(label='Some label here', help_text='help text here')

呈现表单时,test2字段显示如下标签:

another label: <input box>
有没有办法让它显示得更像:

Some label here []
help text here

谢谢

我最终为某些字段使用了自定义模板,例如:

Field('my_field', template='my_field_template.html')

在我的_field_template.html中,我可以指定我想要的顺序。

这就是你要找的:我看了这个例子,但我不确定如何使它与Crispy表单一起工作,因为我的模板只包含以下内容:{%block content%}{%Crispy form%}{%endblock%}
Some label here []
help text here
Field('my_field', template='my_field_template.html')