def move(request, user_id, move_id): player = Recipient.getRecipient(int(user_id)) print(player) mechanic = Mechanics.get_mechanic(int(move_id)) response = mechanic.execute_move(player) # Determine if state should change (all players on same move # or time out or done) return HttpResponse(json.dumps({"state" : player.game_state(), "players" : Recipient.active_players, "donorPool" : int(Mechanics.donor_pool * 100), "formerPatients" : Recipient.former_patients, "result" : response}, default=lambda o: o.__dict__, ensure_ascii=False), content_type = "application/json")