def user_delete(): username = request.args.get('uid', '') if user.user_delete(username): flash(u'删除: %s成功' % username) return redirect('/user/list/') else: return '用户删除失败.'
def my_user_delete(): uid = request.args.get('uid', '') if user_delete(uid): flash(u'删除: %s成功' % uid) return redirect('/user/list/') else: flash(u'删除: %s失败' % uid) return redirect('/user/list/')
def user_delete(): perams = request.args if request.method == 'GET' else request.form uid = perams.get('uid','') _user = user.get_user_by_id(uid=uid)[0] if user.user_delete(_user['id']): flash(u'删除: %s成功' % _user['username']) return redirect('/user/list/') else: return '用户删除失败.'
def user_delete(): id = request.args.get('id') user.user_delete(id) flash('删除用户成功!') return redirect('/users/')