title: Django: How do I make a password input field in a model-form?
body: <p>I'm trying to make a basic Sign Up form that asks for a username, email address and password. The data needs to be saved into django-admin so according to my (limited) experience I need to embed the information in my models.py. </p>
  
  <p>I'm basically just super confused as to how to implement the necessary widget (maybe a missing import or a built-in function?) in my models as well as how the field information in the models section has to differ from the field information in the forms.py section. </p>
  
  <p>Here is my code for models.py:</p>
  
  <pre><code>class SignUp(models.Model):
      email = models.EmailField()
      user_name = models.CharField( max_length = 30, default = '', blank = False, null=True)
      password = models.CharField(widget=forms.PasswordInput())
      confirm_password = models.CharField(widget=forms.PasswordInput())
      timestamp = models.DateTimeField(auto_now_add = True, auto_now = False)
      updated = models.DateTimeField(auto_now_add = False, auto_now = True)
  </code></pre>
  
  <p>and here is the code I have for forms.py:</p>
  
  <pre><code>class SignUpForm(forms.ModelForm):
      class Meta:
         model = SignUp
         fields = ['user_name', 'email', 'pass_word'] #specific order
         password = forms.CharField(widget=forms.PasswordInput())
         widgets = { 'password': forms.PasswordInput(),}
  </code></pre>