Ejemplo n.º 1
0
		def allVote():
			poll = Poll.get_by_key_name('all')
			if poll is None:
				poll = Poll(key_name='all')
				poll.country = 'all'
				poll.clockwise = 0
				poll.counter_clockwise = 0
			if choice == 'clockwise':
				poll.clockwise += 1
			else:
				poll.counter_clockwise += 1
			poll.put()
Ejemplo n.º 2
0
		def countryVote():
			poll = Poll.get_by_key_name(country)
			if poll is None:
				poll = Poll(key_name=country)
				poll.country = country
				poll.clockwise = 0
				poll.counter_clockwise = 0
			if choice == 'clockwise':
				poll.clockwise += 1
			else:
				poll.counter_clockwise += 1
			poll.put()