# New version class MyModel(models.Model): attribute = models.JSONField(...) # Old version (<3.1, Postgres only) from django.contrib.postgres.fields import JSONField class MyModel(models.Model): attribute = JSONField(...)