Django: The page shows “(<django.forms.fields.BooleanField object at …>)” at variable location in a template
问题 I was trying include a checkbox on my template, but it showed me some text on the browser instead. I have a form (forms.py) that contains boolean field, e.g: Class MyForm(forms.Form): my_checkbox = forms.BooleanField(required=False, label='my_checkbox'), and I have the following in my templates/my_app/my_form_template.py: <form id="form" method="post"> {{ form.my_checkbox }} <form> In the browser after running the server, I've got: (<django.forms.fields.BooleanField object at