Ejemplo n.º 1
0
def save_message(request):
    rs = messagestore()
    info = json.loads(request.POST.get('info'))
    info['date']=datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S.%fZ')
    rs.insert_item(info)
    return utils.JsonResponse({'results':'true'})
Ejemplo n.º 2
0
def get_message(request):
    rs = messagestore()
    count = rs.get_total(str(request.user.id),str(request.POST.get('message_people')))
    info  = rs.return_items(str(request.user.id),str(request.POST.get('message_people')),int(request.POST.get('skip')),int(request.POST.get('limit')))
    return utils.JsonResponse({'results': info,'count': count})