Commit bb0a0233 authored by guanghongwei's avatar guanghongwei

修改group

parent c8444ef7
...@@ -526,7 +526,7 @@ def addGroup(request): ...@@ -526,7 +526,7 @@ def addGroup(request):
msg = '' msg = ''
if request.method == 'POST': if request.method == 'POST':
group_name = request.POST.get('name') group_name = request.POST.get('name')
if not group_name: if group_name:
group = Group(name=group_name) group = Group(name=group_name)
group.save() group.save()
msg = u'%s 属组添加成功' % group_name msg = u'%s 属组添加成功' % group_name
...@@ -539,6 +539,8 @@ def addGroup(request): ...@@ -539,6 +539,8 @@ def addGroup(request):
@superuser_required @superuser_required
def showGroup(request): def showGroup(request):
error = ''
msg = ''
groups = Group.objects.all() groups = Group.objects.all()
if request.method == 'POST': if request.method == 'POST':
selected_group = request.REQUEST.getlist('selected') selected_group = request.REQUEST.getlist('selected')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment