Changes between Initial Version and Version 2 of Ticket #19161
- Timestamp:
- Oct 28, 2012, 3:17:28 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #19161
- Property Has patch unset
-
Ticket #19161 – Description
initial v2 1 1 https://docs.djangoproject.com/en/dev/topics/auth/#auth-custom-user 2 2 3 {{{ 3 4 class UserChangeForm(forms.ModelForm): 4 5 """A form for updateing users. Includes all the fields on … … 10 11 class Meta: 11 12 model = MyUser 13 }}} 12 14 13 15 Needs the following added: 14 16 17 {{{ 15 18 def clean_password(self): 16 19 # Regardless of what the user provides, return the initial value. … … 18 21 # field does not have access to the initial value 19 22 return self.initial["password"] 23 }}} 20 24 21 25 Or you get a not-null constraint violation on form submit.