#23980: DATETIME_FORMAT setting not applied with DjangoJSONEncoder
--------------------------------------+--------------------
Reporter: DemarsM | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Serialization) | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
In my settings I have
DATETIME_FORMAT = 'Y-m-d H:i:s'
USE_L10N = False
I am doing:
{{{
data = [{'id':x.id, 'name':x.name, 'date_created': x.date_created} for x
in instances_list]
jsonData = json.dumps(data, cls=DjangoJSONEncoder)
print jsonData
>>> [{"date_created": "2014-12-09T18:31:46.276Z", "id": 8, "name":
"mun_flat"}]
}}}
date_created is a datetime field
--
Ticket URL: <https://code.djangoproject.com/ticket/23980>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.407ea3f45470d0b7c0112a5ceefc0366%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.