def messages_send(request): if request.method == 'POST': form = MessageForm(request.POST) if form.is_valid(): queryset = RPCQuerySet("Message", request = request) queryset.sendRequest("sendMessage", form.cleaned_data["user_to"]["id"], form.cleaned_data["subject"], form.cleaned_data["message"]) return HttpResponseRedirect(reverse("bm.client.views.messages")) else: form = MessageForm(initial = request.GET) return render_to_response("compose.html", { 'form' : form }, context_instance=RequestContext(request))
def messages_delete(request, id): queryset = RPCQuerySet("Message", request = request) queryset.sendRequest("deleteMessage", id) return HttpResponseRedirect(reverse("bm.client.views.messages"))