S
S
sandrain2014-04-14 13:27:00
Django
sandrain, 2014-04-14 13:27:00

Django, is not JSON serializable error, how to fix?

Previously, I was able to save the cleaned_data session from the form.

request.session["profile_data"] = company_form.cleaned_data

After updating to version 1.6.2 of django, an error occurs.
[<Sphere: Юриспруденция>] is not JSON serializable
Because of this, there are many problems in the code, what to do?
UPD:
It seems that in 1.6 Default session serialization switched to JSON
Well, the guys brought problems.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sandrain, 2014-04-14
@sandrain

Resolved the issue:

SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question