def put(self, request, pk, format=None): user = self.get_object(pk) serializer = PersonExpandedSerializer(user, data=request.data, partial=True) if serializer.is_valid(): serializer.save() return Response(serializer.data) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def put(self, request, fb_id, format=None): account = self.get_account(fb_id) pk = account.user.id user = self.get_user(pk) serializer = PersonExpandedSerializer(user, data=request.data, partial=True) if serializer.is_valid(): serializer.save() return Response(serializer.data) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def get(self, request, fb_id, format=None): account = self.get_account(fb_id) pk = account.user.id user = self.get_user(pk) serializer = PersonExpandedSerializer(user) return Response(serializer.data)
def get(self, request, pk, format=None): user = self.get_object(pk) serializer = PersonExpandedSerializer(user) return Response(serializer.data)