Ejemplo n.º 1
0
def trash():
    if current_user.is_authenticated:
        notes = current_user.get_deleted_notes()
        if len(notes) == 0:
            flash("Trash is empty, you are so Tidy!")
            return redirect(url_for('.index'))
        return render_template('app/trash.html', notes=notes)
    else:
        return render_template('index.html')
Ejemplo n.º 2
0
def trash():
    if current_user.is_authenticated:
        notes = current_user.get_deleted_notes()
        if len(notes) == 0:
            flash("Trash is empty, you are so Tidy!")
            return redirect(url_for('.index'))
        return render_template('app/trash.html', notes=notes)
    else:
        return render_template('index.html')
Ejemplo n.º 3
0
def empty_trash():
    list(map(lambda x: delete_forever(x.id), current_user.get_deleted_notes()))
    flash("Took out the Trash")
    return redirect(url_for('.index'))
Ejemplo n.º 4
0
def empty_trash():
    list(map(lambda x: delete_forever(x.id), current_user.get_deleted_notes()))
    flash("Took out the Trash")
    return redirect(url_for('.index'))