﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19161	Line missing on Dev documentation	DavidW	nobody	"https://docs.djangoproject.com/en/dev/topics/auth/#auth-custom-user

class UserChangeForm(forms.ModelForm):
    """"""A form for updateing users. Includes all the fields on
    the user, but replaces the password field with admin's
    pasword hash display field.
    """"""
    password = ReadOnlyPasswordHashField()

    class Meta:
        model = MyUser

Needs the following added:

    def clean_password(self):
        # Regardless of what the user provides, return the initial value.
        # This is done here, rather than on the field, because the
        # field does not have access to the initial value
        return self.initial[""password""]

Or you get a not-null constraint violation on form submit."	Bug	new	Documentation	dev	Normal				Unreviewed	1	0	0	0	1	0
