How to create password input field in django
You need to include the following in your imports;
from django import forms
The widget needs to be a function call, not a property. You were missing parenthesis.
class UserForm(ModelForm):
password = forms.CharField(widget=forms.PasswordInput())
class Meta:
model = User