diff options
| author | Claude Paroz <claude@2xlibre.net> | 2016-08-11 21:05:52 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2016-08-25 21:42:42 +0200 |
| commit | 13c3e5d5a05e9c358d212d154addd703cac3bc66 (patch) | |
| tree | b718eb13592843cc6bfd1e6a56fabf23108bd191 /tests/postgres_tests/migrations | |
| parent | 989f6108d349e0eebdc5ad26b5cb4e882cb32e47 (diff) | |
Fixed #25995 -- Added an encoder option to JSONField
Thanks Berker Peksag and Tim Graham for the reviews.
Diffstat (limited to 'tests/postgres_tests/migrations')
| -rw-r--r-- | tests/postgres_tests/migrations/0002_create_test_models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/postgres_tests/migrations/0002_create_test_models.py b/tests/postgres_tests/migrations/0002_create_test_models.py index 69c5b17f77..974aae1ec8 100644 --- a/tests/postgres_tests/migrations/0002_create_test_models.py +++ b/tests/postgres_tests/migrations/0002_create_test_models.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals +from django.core.serializers.json import DjangoJSONEncoder from django.db import migrations, models from ..fields import ( @@ -223,6 +224,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('field', JSONField(null=True, blank=True)), + ('field_custom', JSONField(null=True, blank=True, encoder=DjangoJSONEncoder)), ], options={ }, |
