From c55c77e349b960e70266e7e10ed293acee68e000 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 23 Jan 2015 23:45:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- juser/views.py | 2 ++ templates/juser/user_detail.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/juser/views.py b/juser/views.py index 7a61d7546..a83811c45 100644 --- a/juser/views.py +++ b/juser/views.py @@ -219,6 +219,8 @@ def user_edit(request): ssh_key_pwd1 = request.POST.get('ssh_key_pwd1', None) is_active = request.POST.get('is_active', '1') ldap_pwd = gen_rand_pwd(16) + all_group = UserGroup.objects.all() + user_role = {'SU': u'超级管理员', 'GA': u'组管理员', 'CU': u'普通用户'} if username: user = User.objects.get(username=username) diff --git a/templates/juser/user_detail.html b/templates/juser/user_detail.html index 0186a2ae8..be846b9a5 100644 --- a/templates/juser/user_detail.html +++ b/templates/juser/user_detail.html @@ -46,7 +46,7 @@ 属组 - {{ user.id|get_role }} + {{ user.username|groups_str }} Email