コード例 #1
0
ファイル: views.py プロジェクト: levlaz/braindump
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')
コード例 #2
0
ファイル: views.py プロジェクト: olivierh59500/braindump
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')
コード例 #3
0
ファイル: views.py プロジェクト: olivierh59500/braindump
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'))
コード例 #4
0
ファイル: views.py プロジェクト: levlaz/braindump
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'))