> On Aug 3, 2018, at 07:18, Anusha Kommineni <[email protected]>
> wrote:
> TypeError: datetime.datetime(2018, 2, 12, 0, 0, tzinfo=<UTC>) is not JSON
> serializable
The error means what it says; there is no default way of serializing a datetime
into JSON. You can use the DjangoJSONEncoder, which does allow serializing
datetimes:
https://docs.djangoproject.com/en/2.0/topics/serialization/#djangojsonencoder
--
-- Christophe Pettus
[email protected]
--
You received this message because you are subscribed to the Google Groups
"Django users" 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].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/DCF58620-3F8A-4121-A0FD-7CB3C1922531%40thebuild.com.
For more options, visit https://groups.google.com/d/optout.