示例#1
0
def _render_root_page(page, values):
    values.source_cache_key = _source_cache_key()
    values.app_version = simulation_db.app_version()
    return flask.render_template(
        'html/{}.html'.format(page),
        **values
    )
示例#2
0
文件: server.py 项目: yeeon/sirepo
def _render_root_page(page, values):
    values.update(
        pkcollections.Dict(
            app_version=simulation_db.app_version(),
            source_cache_key=_source_cache_key(),
            static_files=simulation_db.static_libs(),
        ))
    return http_reply.render_static(page, 'html', values, cache_ok=True)
示例#3
0
文件: server.py 项目: mrakitin/sirepo
def light_landing_page():
    return flask.render_template(
        'html/sr-landing-page.html',
        version=simulation_db.app_version(),
    )
示例#4
0
文件: server.py 项目: mrakitin/sirepo
def app_root(simulation_type):
    return flask.render_template(
        'html/index.html',
        version=simulation_db.app_version(),
        app_name=simulation_type,
    )
示例#5
0
文件: server.py 项目: yeeon/sirepo
def _source_cache_key():
    if cfg.enable_source_cache_key:
        return '?{}'.format(simulation_db.app_version())
    return ''
示例#6
0
def light_landing_page():
    return flask.render_template(
        'html/sr-landing-page.html',
        version=simulation_db.app_version(),
    )
示例#7
0
def app_root(simulation_type):
    return flask.render_template(
        'html/index.html',
        version=simulation_db.app_version(),
        app_name=simulation_type,
    )