Untitled
unknown
python
a year ago
294 B
1
Indexable
Never
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()