一天修改10变

pull/2/head
guanghongwei 2014-09-29 16:05:53 +08:00
parent 222162eaa7
commit 1f272aa03c
1 changed files with 2 additions and 2 deletions

View File

@ -470,12 +470,12 @@ def chgUser(request):
if request.method == "GET":
username = request.GET.get('username')
if not username:
return HttpResponseRedirect('/showUser/')
user = User.objects.get(username=username)
is_admin = "checked" if user.is_admin else ''
is_superuser = 'checked' if user.is_superuser else ''
groups = user.group.all()
if not username:
return HttpResponseRedirect('/showUser/')
return render_to_response('chgUser.html',
{'user': user, 'user_menu': 'active', 'is_admin': is_admin,