I'm using contrib.postgres.fields.JSONField to store some JSON data with Django 1.11.
Contrary to the convention described in this answer, I'd like to store None
as JSON. However, Django by default tries to store None
as SQL NULL
, and errors if I set the field to null=False
.
Is there any way to get Django to store None
as 'none'::jsonb
?