@view_config(request_method='POST')
    def post(self):
        try:
            appstruct = self.form.validate(self.request.POST.items())
        except deform.ValidationFailure:
            # If the code is valid, hide the field.
            if not self.form['user'].error:
                self.form.set_widgets({'user': deform.widget.HiddenWidget()})
            return {'form': self.form.render()}

        self._reset_password(appstruct['user'], appstruct['password'])

        return httpexceptions.HTTPFound(
            location=self.request.route_path('index'))
Handle submission of the reset password form.
dataset/ETHPy150Open hypothesis/h/h/accounts/views.py/ResetPasswordController.post