Пример #1
0
def get_contacts_page():
    contacts = get_contact_dicts()
    contacts = sorted(contacts, key=lambda c: c.get('email', ''))

    return render_template(
        'contacts.html',
        contacts=contacts,
        **_get_render_data(),
    )
Пример #2
0
def get_send_reply(uid):
    if DEBUG:
        reply = SEND_WINDOW_DATA.get(uid)
    else:
        reply = SEND_WINDOW_DATA.pop(uid, None)

    if not reply:
        abort(404, 'Reply message not found!')

    return render_template(
        'send.html',
        reply=reply,
        contacts=get_contact_dicts(),
        **_get_render_data(),
    )
Пример #3
0
def get_send():
    return render_template(
        'send.html',
        contacts=get_contact_dicts(),
        **_get_render_data(),
    )