示例#1
0
文件: admin.py 项目: missundaztood/fc
def delete_member(id):
    if request.method == 'GET':
        user = users.find_by_id(id)
        return render_template('admin/delete_member.html', user=user)
    else:
        if is_yes():
            logi('delete member: uid=%d', id)
            users.delete_by_id(id)
        else:
            logi('not delete member: uid=%d', id)
        return redirect(url_for('admin.member'))
示例#2
0
文件: test_bbs.py 项目: kzkn/fc
def teardown_testdata():
    users.delete_by_id(1)
    getdb().execute("DELETE FROM BBS")