Changes between Initial Version and Version 2 of Ticket #19161


Ignore:
Timestamp:
10/28/2012 03:17:28 PM (3 years ago)
Author:
aaugustin
Comment:

Fixed formatting (please use preview).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19161

    • Property Patch needs improvement unset
    • Property Has patch unset
    • Property Needs tests unset
    • Property Needs documentation unset
  • Ticket #19161 – Description

    initial v2  
    11https://docs.djangoproject.com/en/dev/topics/auth/#auth-custom-user
    22
     3{{{
    34class UserChangeForm(forms.ModelForm):
    45    """A form for updateing users. Includes all the fields on
     
    1011    class Meta:
    1112        model = MyUser
     13}}}
    1214
    1315Needs the following added:
    1416
     17{{{
    1518    def clean_password(self):
    1619        # Regardless of what the user provides, return the initial value.
     
    1821        # field does not have access to the initial value
    1922        return self.initial["password"]
     23}}}
    2024
    2125Or you get a not-null constraint violation on form submit.
Back to Top