title: How to apply style to a Django form?
body: <p>It is possible to change the style of form in the view?</p>
  
  <p>I found in documentation this code:</p>
  
  <pre><code>&lt;form action="/contact/" method="post"&gt;
      {{ form.non_field_errors }}
      &lt;div class="fieldWrapper"&gt;
          {{ form.subject.errors }}
          &lt;label for="id_subject"&gt;Email subject:&lt;/label&gt;
          {{ form.subject }}
      &lt;/div&gt;
      &lt;div class="fieldWrapper"&gt;
          {{ form.message.errors }}
          &lt;label for="id_message"&gt;Your message:&lt;/label&gt;
          {{ form.message }}
      &lt;/div&gt;
      &lt;div class="fieldWrapper"&gt;
          {{ form.sender.errors }}
          &lt;label for="id_sender"&gt;Your email address:&lt;/label&gt;
          {{ form.sender }}
      &lt;/div&gt;
      &lt;div class="fieldWrapper"&gt;
          {{ form.cc_myself.errors }}
          &lt;label for="id_cc_myself"&gt;CC yourself?&lt;/label&gt;
         {{ form.cc_myself }}
      &lt;/div&gt;
      &lt;p&gt;&lt;input type="submit" value="Send message" /&gt;&lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>But it just put a ugly input. I want to apply a class, or a css in this input. Is it possible?</p>
  
  <p>This is my form:</p>
  
  <pre><code>class LoginView(NextUrlMixin, RequestFormAttachMixin, FormView):
      form_class = LoginForm
      success_url = '/'
      template_name = 'accounts/login.html'
      default_next = '/'
  
  
  class LoginForm(forms.Form):
      email    = forms.EmailField(label='Email')
      password = forms.CharField(widget=forms.PasswordInput)
  </code></pre>