I have three Django models.
class Asset(models.Model):
name = models.CharField(max_length=255)
class Place(Asset):
location = PointField()
class Zone(Asset):
location = PolygonField()
I want to use the same endpoint for Place and Zone. Is it possible to decide for each request which serializer will be used e.g. I could easily check if the requested Asset is a Place or a Zone?
I am only interested in handling a single instance hence there is no need to handle ListView etc.