title: How to create password input field in django
body: <p>Hi I am using the django model class with some field and a password field. Instead of displaying regular plain text I want to display password input. I created a model class like this:</p>
  
  <pre><code>class UserForm(ModelForm):
      class Meta:
          password = forms.CharField(widget=forms.PasswordInput)
          model = User
          widgets = {
              'password': forms.PasswordInput(),
          }
  </code></pre>
  
  <p>But i am getting the following error: NameError: name 'forms' is not defined. </p>
  
  <p>I am using django version 1.4.0. I followed this link : <a href="https://stackoverflow.com/questions/3532354/django-password-problems">Django password problems</a></p>
  
  <p>Still getting the same error. What should i do. Where am i getting wrong.Please help</p>