예제 #1
0
def handle(request): 
    try:
        myself = siteaction.getLoggedInUser(request)
        if not myself:
            return ajaxian.getFailureResp('not_logged_in')
        
        msg_id = dataplus.dictGetVal(request.REQUEST,'messageId')
        result, msg = mailman.deleteMessage(myself.account, msg_id)
        if not result:
            ajaxian.getFailureResp(msg)
        else:        
            return ajaxian.getSuccessResp(msg)
    except:
        return ajaxian.getFailureResp('unknown')
예제 #2
0
def deleteMessages(request, tom):
    for key, val in request.POST.iteritems():
        if key.find('chkMsg_') == 0:
            msg_id = string.atoi(key[7:])
            mailman.deleteMessage(tom.account, msg_id)