I have a simple view
def foo(request):
card = Card.objects.latest(datetime)
request.session['card']=card
For the above code I get the error
"<Card: Card object> is not JSON serializable"
Django version 1.6.2. What am I doing wrong ?
@Martijn is or might be the correct way to save the object in session variables.
But the issue was solved by moving back to Django 1.5. So this issue is specifically for django 1.6.2.
Hope this helps.