title: Django. how to apply css style on boolean form field?
body: <p>I want to apply css style(link is below) to my Django boolean form in my template. 
  <a href="https://proto.io/freebies/onoff/" rel="nofollow">https://proto.io/freebies/onoff/</a></p>
  
  <p>I did something like this. The style is applied to the checkbox but the checkbox doesn't change status 'OFF' to 'ON'. (when I click it, it would not do anything)</p>
  
  <pre><code>Template
  &lt;div class="onoffswitch"&gt;
    &lt;span class="onoffswitch-checkbox" id="myonoffswitch" checked&gt;{{form.mixed_load}}&lt;/span&gt;
      &lt;label class="onoffswitch-label" for="myonoffswitch"&gt;
         &lt;span class="onoffswitch-inner"&gt;&lt;/span&gt;
         &lt;span class="onoffswitch-switch"&gt;&lt;/span&gt;
      &lt;/label&gt;
  &lt;/div&gt;
  
  Forms.py
  mixed_load = forms.BooleanField(widget=forms.CheckboxInput(attrs={'class':'onoffswitch'}))
  </code></pre>
  
  <p>Can someone tell me how to apply css style to Django form more effectively?</p>
  
  <p>Thank you</p>