Exemplo n.º 1
0
def vote():
    try:
        print(request.data)
        # {"member":"Yes"}
        data = simplejson.loads(request.data)
        update_item(c, [data['member']])
        output = select_all_items(c, [data['member']])
        print(output)
        pusher_client.trigger(u'chime-poller', u'vote', output)
        #output = display_all_items(c)
        return output
    except:
        return "You can't vote now!"
Exemplo n.º 2
0
def vote():
    data = simplejson.loads(request.data)
    update_item(c, [data['member']])
    output = select_all_items(c, [data['member']])
    pusher.trigger(u'poll', u'vote', output)
    return request.data