summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/postgres_tests/models.py')
-rw-r--r--tests/postgres_tests/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/postgres_tests/models.py b/tests/postgres_tests/models.py
index d94eb90d4a..52dbc0335c 100644
--- a/tests/postgres_tests/models.py
+++ b/tests/postgres_tests/models.py
@@ -1,3 +1,4 @@
+from django.core.serializers.json import DjangoJSONEncoder
from django.db import connection, models
from .fields import (
@@ -132,6 +133,7 @@ class RangeLookupsModel(PostgreSQLModel):
if connection.vendor == 'postgresql' and connection.pg_version >= 90400:
class JSONModel(models.Model):
field = JSONField(blank=True, null=True)
+ field_custom = JSONField(blank=True, null=True, encoder=DjangoJSONEncoder)
else:
# create an object with this name so we don't have failing imports
class JSONModel(object):