'Handle the "change password" task -- both form display and validation.'

def password_change(self, request, extra_context=None):

    from django.contrib.admin.forms import AdminPasswordChangeForm
    from django.contrib.auth.views import PasswordChangeView
    url = reverse('admin:password_change_done', current_app=self.name)
    defaults = {'form_class': AdminPasswordChangeForm, 'success_url': url, 'extra_context': dict(self.each_context(request), **(extra_context or {}))}
    if (self.password_change_template is not None):
        defaults['template_name'] = self.password_change_template
    request.current_app = self.name
    return PasswordChangeView.as_view(**defaults)(request)
