45👍
Django 1.6 changed the serializer from pickle to json. pickle can serialize things that json can’t.
You can change the value of SESSION_SERIALIZER in your settings.py
to get back the behaviour from Django before version 1.6.
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
You might want to read about session serialization in the documentation.
6👍
Setting this line to settings.py will clear the error when upgraded to django 1.6 version
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
- Token authentication does not work in production on django rest framework
- Django Rest Framework custom POST URL endpoints with defined parameter (request.POST) with Swagger or other doc
- 413 Payload Too Large on Django server
- How to use Channel instead of Group when using django channels?
1👍
After analyzing the traceback, it seems that the JSONEncoder can not serialize the instance of your Client model. Generally, you got such error if you try to serialize a model related to other models (Many2ManyField, etc.) using json or simplejson libraries.
See this https://docs.djangoproject.com/en/dev/topics/serialization/, You can also use some 3rd-party packages such as DjangoRestFramework depending on your needs.
- Django multiple foreign key, Same related name
- Django REST Framework – POSTing foreign key field containing natural key?
- Celery does not registering tasks
- Django – how to get user logged in (get_queryset in ListView)
- How to update a file location in a FileField?