Untitled
class CreateGroupwithUser(APIView): def post(self, request): group_name = user_id = [] group_obj = Group.create(group_name) for id in user_id: user = User.get(pk=user_id) user.group = [group_obj.id] user.save()
class CreateGroupwithUser(APIView): def post(self, request): group_name = user_id = [] group_obj = Group.create(group_name) for id in user_id: user = User.get(pk=user_id) user.group = [group_obj.id] user.save()