mirror of
https://github.com/django/django.git
synced 2025-11-01 20:31:40 +00:00
Fixed #25995 -- Added an encoder option to JSONField
Thanks Berker Peksag and Tim Graham for the reviews.
This commit is contained in:
parent
989f6108d3
commit
13c3e5d5a0
7 changed files with 98 additions and 10 deletions
|
|
@ -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={
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue