I have a model like this:
## model:
class Product(models.Model):
id = models.PositiveIntegerField(unique = True)
price = models.ForeignKey(Price, on_delete = models.CASCADE, null = True, blank = True)
## serializer:
class ProductSerializer(serializers.ModelSerializer):
class Meta:
model = Product
fields = ["id", "price",]
which shows up in the template of the API like this:
I get, this is because of the nature of the model field type. Two questions here: