Ejemplo n.º 1
0
	def post(self):
		query = Game.gql("WHERE inProgress = False")
		games = query.fetch(20)
		self.response.headers['Content-Type'] = 'application/json'
		output = []
		for game in games :
			output.append({'key' : game.key().name(), 'players' : 4 - len(game.pieces)})
		self.response.write(json.dumps(output))