[Answer]-How to create check box and display it in templates

1👍

You can use django’s automatic as_p function in templates, or you can write your template manually (to have more control on it’s attributes).

For automatic you need this in your template:

{{ form.as_p }}

For manual you should use something like this:

<input type="checkbox" id="livereport" name="livereport" {% if form.livereport.value %}checked="checked"{% endif %}>
<label for="livereport">Show live report</label>

Leave a comment