Beispiel #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
    )
Beispiel #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,
    )
Beispiel #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
Beispiel #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),
    )
Beispiel #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)
    )
Beispiel #6
0
def html(request, template):
    return render_template(template, var='toto')