1👍
If you writing a form in template by hands (its not so good), so you can just type:
<form action="" method="POST">
<input type="password" name="pass">
</form>
but if you render form like this {{form}} , you need to change your form to
from django.forms import CharField, Form, PasswordInput
class UserForm(Form):
password = CharField(widget=PasswordInput())
Source:stackexchange.com