def api_root(path_info): if path_info is None: return http_reply.gen_redirect(cfg.home_page_uri) if sirepo.template.is_sim_type(path_info): return _render_root_page('index', PKDict(app_name=path_info)) u = sirepo.uri.unchecked_root_redirect(path_info) if u: return http_reply.gen_redirect(u) sirepo.util.raise_not_found(f'unknown path={path_info}')
def api_root(simulation_type): try: req = http_request.parse_params(type=simulation_type) except AssertionError: if simulation_type == 'warp': return http_reply.gen_redirect(sirepo.uri.app_root('warppba')) if simulation_type == 'fete': return http_reply.gen_redirect(sirepo.uri.app_root('warpvnd')) sirepo.util.raise_not_found('Invalid simulation_type={}', simulation_type) return _render_root_page('index', PKDict(app_name=req.type))
def authorize_redirect(self, redirect_uri=None, **kwargs): return http_reply.gen_redirect( self.create_authorization_url(redirect_uri, **kwargs)['url'], )
def api_comsol(): return http_reply.gen_redirect( 'https://www.radiasoft.net/services/comsol-certified-consulting/', )