password as password field in form
This commit is contained in:
parent
84fc9f9570
commit
13c259cc60
|
@ -16,6 +16,11 @@ class RegisterAccountView(CreateView):
|
|||
fields = ['name', 'password', 'email']
|
||||
template_name = 'register_account.html'
|
||||
|
||||
def get_form(self, form_class=None):
|
||||
form = super(RegisterAccountView, self).get_form(form_class)
|
||||
form.fields['password'].widget = forms.PasswordInput()
|
||||
return form
|
||||
|
||||
def form_valid(self, form):
|
||||
self.object = form.save(commit=False)
|
||||
|
||||
|
|
Loading…
Reference in New Issue