[Answer]-Django – How to Define a Model with 2 Field Types for a JSON Import

1👍

Define mc as an integer that can be null:

mc = models.IntegerField(blank=True, null=True)

That way you will either have an integer with the cost or a null value in your database.

Leave a comment