title: django form: how to check out checkbox state in template
body: <p>I have a form with checkboxes that works fine, but when the user submits the form with errors and my checkbox is checked I need to change div class which holds the checkbox. So I was experimenting with <code>{{ form.mycheckbox.data }}</code> in the template and it says <strong>False</strong> on page load. Now when user is click on a checkbox and the form has errors, it says <strong>on</strong>. So I tried:</p>
  
  <p><code>{{ if form.mycheckbox.data == True }}</code> doesn't work</p>
  
  <p><code>{{ if form.mycheckbox.data != False }}</code> doesn't work</p>
  
  <p><code>{{ if form.mycheckbox.data == 'on' }}</code> doesn't work</p>
  
  <p><code>{{ if form.mycheckbox.data == on }}</code> doesn't work</p>