def index():
    message = session.pop('message', '')
    return render_template(
        'index.html',
        contacts=contacts.list_contacts(),
        message=message
    )
def ask_list_contacts():
    global tl
    b_l.config(text="Close List", command=on_tl_exit)
    tl = Toplevel(root)
    tl.bind('<Destroy>', on_tl_exit)
    scrollbar = Scrollbar(tl)
    scrollbar.pack(side=RIGHT, fill=Y)
    lb = Listbox(tl)
    lb.pack()
    lb.config(yscrollcommand=scrollbar.set)
    scrollbar.config(command=lb.yview)
    for name, phone in contacts.list_contacts():
        lb.insert(0, "{}:{}".format(name, phone))
Beispiel #3
0
def ask_list_contacts():
    global tl
    b_l.config(text="Close List", command=on_tl_exit)
    tl = Toplevel(root)
    tl.bind('<Destroy>', on_tl_exit)
    scrollbar = Scrollbar(tl)
    scrollbar.pack(side=RIGHT, fill=Y)
    lb = Listbox(tl)
    lb.pack()
    lb.config(yscrollcommand=scrollbar.set)
    scrollbar.config(command=lb.yview)
    for name, phone in contacts.list_contacts():
        lb.insert(0, "{}:{}".format(name, phone))
def index():
    message = session.pop('message', '')
    return render_template('index.html',
                           contacts=contacts.list_contacts(),
                           message=message)