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!"
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