I need to configure a django.contrib.postgres.fields.ArrayField with a list of pairs in which the fist element is a float and the second, a small positive integer:
data = [[1.23, 3], [2.42, 1], [3.72, 29]]
How could I do this? Is it possible? I tried something like this, but didn't work:
class MyModel(models.Model):
my_field = ArrayField(
models.FloatField(default=0),
models.PositiveSmallIntegerField(default=0),
null=True
)