From 544bc109975742d5cd49d476cc2ed2d02102fcd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=93=9D=E6=9E=AB?= Date: Tue, 31 Mar 2015 21:07:50 +0800 Subject: [PATCH] Update views.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改查看权限列表和添加权限列表不一致的bug --- webroot/AutoSa/AutoSa/views.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/webroot/AutoSa/AutoSa/views.py b/webroot/AutoSa/AutoSa/views.py index ca9a54d19..ea87a8bc8 100644 --- a/webroot/AutoSa/AutoSa/views.py +++ b/webroot/AutoSa/AutoSa/views.py @@ -824,21 +824,9 @@ def addAssets(request): def showPerm(request): """查看权限""" if is_super_user(request): - users_all = User.objects.all() + users = User.objects.all() else: - users_all = group_member(request.session.get('username')) - - paginator = Paginator(users_all, 20) - - try: - page = int(request.GET.get('page', 1)) - except ValueError: - page = 1 - - try: - users = paginator.page(page) - except (EmptyPage, InvalidPage): - users = paginator.page(paginator.num_pages) + users = group_member(request.session.get('username')) if request.method == 'POST': assets_del = request.REQUEST.getlist('selected')