Untitled

mail@pastecode.io avatar
unknown
python
a year ago
294 B
1
Indexable


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()