Exemple #1
0
	def get(self, page_id):
		offer = memcache.get("page"+page_id)

		if not offer:
			offer = Offer.get_by_id(int(page_id))
			memcache.set("page"+page_id,offer)

		if offer:
			self.render('index.html',offers=[offer],num_offers=-1, uploaded_date_offers=None)
		else:
		 	self.redirect('/static/pages/404.html')
Exemple #2
0
	def	get(self,image_id):
		offer = Offer.get_by_id(int(image_id))
		self.response.headers['Content-Type'] = 'image/jpeg'		
		self.response.out.write(offer.image)