Commit bb0a0233 authored by guanghongwei's avatar guanghongwei

修改group

parent c8444ef7
......@@ -526,7 +526,7 @@ def addGroup(request):
msg = ''
if request.method == 'POST':
group_name = request.POST.get('name')
if not group_name:
if group_name:
group = Group(name=group_name)
group.save()
msg = u'%s 属组添加成功' % group_name
......@@ -539,6 +539,8 @@ def addGroup(request):
@superuser_required
def showGroup(request):
error = ''
msg = ''
groups = Group.objects.all()
if request.method == 'POST':
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