The `.create()` method does not support writable nested fields by default. Write an explicit `.create()` method for serializer `room_api.serializers.roomSerializer`, or set `read_only=True` on nested serializer fields.

class CoreInformation(generics.ListCreateAPIView):
    queryset = models.CoreInformation.objects.all()
    serializer_class = CustomCoreInfoSerializer

    def create(self, request, *args, **kwargs):
        serializer = self.get_serializer(
        instance = self.perform_create(serializer)
        serializer = self.get_serializer(instance=instance)
        return Response(, status=status.HTTP_201_CREATED)

    def perform_create(self, serializer):
        return serializer.create(validated_data=serializer.validated_data)

Here is what the above code is Doing:
1. We’re creating a new view called CoreInformation.
2. We’re setting the queryset to all of the core information objects.
3. We’re setting the serializer class to CustomCoreInfoSerializer.
4. We’re overriding the create method to use our custom serializer.
5. We’re overriding the perform_create method to use our custom serializer.
6. We’re returning a response with the data from our custom serializer.