Browse Source

不显示默认的group

pull/6/head
guanghongwei 10 years ago
parent
commit
c04237ac76
  1. 4
      jumpserver/templatetags/mytags.py

4
jumpserver/templatetags/mytags.py

@ -34,9 +34,11 @@ def groups_str(username):
group_default = UserGroup.objects.get(name=username)
for group in user.user_group.all():
groups.append(group.name)
groups.remove(group_default)
if group_default in groups:
groups.remove(group_default)
return ','.join(groups)
@register.filter(name='get_item')
def get_item(dictionary, key):
return dictionary.get(key)

Loading鈥
Cancel
Save