I saw that now in Django 1.7 I can use the http.JSONResponse object to send JSON to a client. My View is:
#Ajax
def get_chat(request):
    usuario = request.GET.get('usuario_consultor', None)
    usuario_chat = request.GET.get('usuario_chat', None)
    mensajes = list(MensajeDirecto.objects.filter(Q(usuario_remitente = usuario, usuario_destinatario = usuario_chat) | Q(usuario_remitente = usuario_chat, usuario_destinatario = usuario)))
    return JsonResponse(mensajes, safe=False)
But I get the next error:
<MensajeDirecto: Towi CrisTowi> is not JSON serializable`
Do you know how to serialize a QuerySet to send it back in JSON form?
 
     
    