'Shared helper returning the rendering context for signup and reset password'

def get_auth_signup_qcontext(self):

    qcontext = request.params.copy()
    qcontext.update(self.get_auth_signup_config())
    if qcontext.get('token'):
        try:
            token_infos = request.env['res.partner'].sudo().signup_retrieve_info(qcontext.get('token'))
            for (k, v) in token_infos.items():
                qcontext.setdefault(k, v)
        except:
            qcontext['error'] = _('Invalid    signup    token')
            qcontext['invalid_token'] = True
    return qcontext
