Exemplo n.º 1
0
def users(request):
    role_list = get_role_list(request.db_session)
    return render_template(
        'settings/user.html',
        nav=True, role=request.current_user,
        role_list=role_list
    )
Exemplo n.º 2
0
def notifications(request):
    return render_template(
        'settings/notifications.html',
        nav=True,
        role=request.current_user,
        email_configured=app.config.notifications.smtp_host,
        sms_configured=app.config.notifications.twilio_account_sid,
    )
Exemplo n.º 3
0
def test_template(mocker):
    loader = mocker.patch('temboardui.web.render_template.loader')

    from temboardui.web import render_template

    response = render_template('test.html', var='toto')
    assert loader.load.called is True
    assert 200 == response.status_code
Exemplo n.º 4
0
def groups(request, kind):
    return render_template(
        "settings/group.html",
        nav=True,
        role=request.current_user,
        group_kind=kind,
        group_list=get_group_list(request.db_session, kind),
    )
Exemplo n.º 5
0
def instances(request):
    return render_template(
        'settings/instance.html',
        nav=True, role=request.current_user,
        instance_list=get_instance_list(request.db_session)
    )
Exemplo n.º 6
0
def html(request, template):
    return render_template(template, var='toto')