Взял встроенную форму UserChangeForm, немного допилил
class UserChangeForm(forms.ModelForm):
password = forms.CharField(label=_("New password"),
widget=forms.PasswordInput,
strip=False)
class Meta:
model = User
fields = '__all__'
def __init__(self, *args, **kwargs):
super(UserChangeForm, self).__init__(*args, **kwargs)
f = self.fields.get('user_permissions')
if f is not None:
f.queryset = f.queryset.select_related('content_type')
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"]
user.set_password(self.cleaned_data["password"])
if commit:
user.save()
return user
Пароль вроде как сохраняется в хеше, это я вижу когда захожу под другим пользователем. Но зайти под созданным из формы паролем не могу. печаль(