修改删除用户

pull/6/head
guanghongwei 2015-01-27 17:30:20 +08:00
parent c782b46f32
commit 3c8a9bab0c
1 changed files with 2 additions and 0 deletions

View File

@ -245,6 +245,8 @@ def user_del(request):
return HttpResponseRedirect('/') return HttpResponseRedirect('/')
user = User.objects.get(id=user_id) user = User.objects.get(id=user_id)
user.delete() user.delete()
group = UserGroup.objects.get(name=user.username)
group.delete()
return HttpResponseRedirect('/juser/user_list/', locals()) return HttpResponseRedirect('/juser/user_list/', locals())