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

def password_change(self, request):

    from django.contrib.auth.views import password_change
    if (self.root_path is not None):
        url = ('%spassword_change/done/' % self.root_path)
    else:
        url = reverse('admin:password_change_done', current_app=self.name)
    defaults = {'post_change_redirect': url}
    if (self.password_change_template is not None):
        defaults['template_name'] = self.password_change_template
    return password_change(request, **defaults)
