Esempio n. 1
0
def poke(doit=False):
    keyholders = User.query_keyholders().all()
    for k in keyholders:
        for key in k.keys:
            if key.allocated:
                continue
            if key.last_activity.days in (3, 5, 7) or key.last_activity.days >= 10:
                notify_stale_keyholder(k, key, doit=doit)
Esempio n. 2
0
File: main.py Progetto: ktt-ol/poisk
def keys():
    keys = Key.query_ordered().all()
    keyholders = User.query_keyholders().all()
    return render_template("keys.html", keys=keys, keyholders=keyholders)
Esempio n. 3
0
File: main.py Progetto: ktt-ol/poisk
def index():
    keys = Key.query_ordered().all()
    keyholders = []
    if g.user.is_keyholder:
        keyholders = User.query_keyholders().all()
    return render_template("index.html", keys=keys, keyholders=keyholders)