title: Django. How to change the input class of a Built-in form
body: <p>I'm trying to change the class of the django Built-in form PassowrdChangeForm. This is what I tried, but it doesn't work:</p>
  
  <p>forms.py</p>
  
  <pre><code>from django.contrib.auth.forms import PasswordChangeForm
  class FormChangePassword(PasswordChangeForm):
      class Meta:
          widgets = {
              'old_password': PasswordInput(attrs={'class': 'form-control'}),
              'new_password1': PasswordInput(attrs={'class': 'form-control'}),
              'new_password2': PasswordInput(attrs={'class': 'form-control'})
      }
  </code></pre>
  
  <p>and just in case it is useful info, I'm using the built-in password_change view like this:</p>
  
  <p>urls.py</p>
  
  <pre><code>from django.contrib.auth.views import password_change
  from forms import FormChangePassword
  url(r'^change_password/$', password_change,
              {'template_name': 'sisacademico/change_password.html',
               'post_change_redirect': 'password_changed/',
               'password_change_form': FormChangePassword},
                  name='change_password'),
  </code></pre>
  
  <p>It doesn't work, the form doesn't get the class 'form-control', any ideas?</p>