| Name | abjacs |
|---|---|
| Email Address | n/a |
| Posts | 2 |
-
- 2009-06-14 17:17:16
- Can't save encrypted password from model that is subclass of User
- Board » Django Standard Library » Authentication
-
Hi.
I created a model called Customer that is a subclass of django.contrib.auth.models.User.
I have a form to register customers:class CustomerForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=(u'Password')) class Meta: model = Customer fields = ("first_name", "last_name", "email", "address", "city", "state", "zip")
I can successfully register a user, but when I look at the Customer in django admin I find the following:
There is no saved password for the user, even though I entered one when registering.
I'm thinking that I must not be saving the model correctly, but I'm not sure what to do to fix this issue.
Here's what the save method for the Customer model looks like:
def save(self): super(Customer, self).save()
Thanks
-
- 2009-06-14 17:12:25
- Can't save encrypted password from model that is subclass of User
- Board » Django » Models
-
Hi.
I created a model called Customer that is a subclass of django.contrib.auth.models.User.
I have a form to register customers:class CustomerForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=(u'Password')) class Meta: model = Customer fields = ("first_name", "last_name", "email", "address", "city", "state", "zip")
I can successfully register a user, but when I look at the Customer in django admin I find the following:
There is no saved password for the user, even though I entered one when registering.
I'm thinking that I must not be saving the model correctly, but I'm not sure what to do to fix this issue.
Here's what the save method for the Customer model looks like:
def save(self): super(Customer, self).save()
Thanks


