I have a problem passing an object using pusher it gives me an error Error: new_action is not JSON serializable
. I tried json.dumps(new_action)
but still not working. Here is my code :
views.py:
new_action = Action(actor=actor, verb=verb, action_object=action_object,description=description, target=target)
new_action.save()
p['stream_' + str(actor.username)].trigger('liveStream', {
'new_action': new_action,
});
return new_action