Re: Does not generate the password hash my User
The problem is that you have a `password` field in your `Cliente` model. So the `ClienteForm` save the readable value of the password in the Cliente model.
You should not have this field in the model. Instead override the save method of your `ClientForm` to create the user in the form and not in the model.
That way the password will be stored only hashed, and only in the User model.
cheers,
Jérôme
2013/12/6 Ricardo <ricardokamada@gmail.com>
Ok
Em quinta-feira, 5 de dezembro de 2013 17h54min44s UTC-2, Ricardo escreveu:I have a model "Cliente" and in it a field "password".In forms.py file, I am using ModelForm, but put in the password fieldPassword = forms.CharField (widget = forms.PasswordInput (render_value = True))It turns out that the admin password field appears readable, and I do not want that to happen.I tried to put in set_password. Models but did not succeed.Now if I put in the admin:form = FormClienteDisplays the password field and confirm password type password.But I will not so I want to appear only the password hash.in line 19 does not generate the password hash, but the readable passwordRicardo--To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/61ead39c-3c6c-437d-815b-37944df833b2%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOLVUFf9dJOS6b_uwaurTfwfZeydAUt6px6sOVDD%3D8SPv9WdtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home