From d4f40feebf1f5cc15d2e179bc7e349ca7ee5e9d1 Mon Sep 17 00:00:00 2001 From: guanghongwei Date: Tue, 23 Sep 2014 21:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=87=EE=86=BD=E6=95=BCbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/AutoSa/AutoSa/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webroot/AutoSa/AutoSa/views.py b/webroot/AutoSa/AutoSa/views.py index e8bd74e44..d5b706452 100644 --- a/webroot/AutoSa/AutoSa/views.py +++ b/webroot/AutoSa/AutoSa/views.py @@ -264,7 +264,8 @@ def index(request): @admin_required def showUser(request): """查看所有用户""" - + info = '' + error = '' if request.method == 'POST': selected_user = request.REQUEST.getlist('selected') if selected_user: @@ -290,6 +291,7 @@ def showUser(request): if not error: info = '用户删除成功' + return HttpResponseRedirect('/showUser/') else: if request.session.get('admin') == 2: @@ -297,7 +299,7 @@ def showUser(request): elif request.session.get('admin') == 1: users = group_member(request.session.get('username')) - return render_to_response( + return render_to_response( 'showUser.html', {'users': users, 'info': info, 'error': error, 'user_menu': 'active'}, context_instance=RequestContext(request))