You made some errors in your Meta class and model attribute: it is Meta (starting with an uppercase), and model (starting with a lowercase):
class UserForm(forms.ModelForm):
password=forms.CharField(widget=forms.PasswordInput())
class Meta:
model = User
fields = ('username' , 'email' , 'password')
But that will not be sufficient. You can not set the password of the User model by setting the attribute. Django hashes the password. You should use the User.set_password(..) method [Django-doc]. You can do so by overriding the save() method:
class UserForm(forms.ModelForm):
password=forms.CharField(widget=forms.PasswordInput())
def save(self, commit=True):
user = super().save(commit=False)
user.set_password(self.cleaned_data['password'])
if commit:
user.save()
return user
class Meta:
model = User
fields = ('username' , 'email' , 'password')
model(with a lowercase), notModel. Furthermore it isMeta(with an uppercase), notmeta.set_passwordover the standard behavior of theModelFormto hash the password.set_passwordis an issue as well.