Exemplo n.º 1
0
    def get(self):
	try:
	    id64 = self.path_tail()
	    q = Listing.all()
	    q.filter('owner = ', id64)
	    qs = parse_qs(self.request.query_string)
	    #if (user_steam_id(users.get_current_user()) == id64) and 'ext' in qs:
            if not 'ext' in qs:
		q.filter('status = ', 'active')
	    q.order('-created')
	    rs = [r.encode_builtin() for r in q.fetch(limit=100)]
	    self.write_json(rs)
	except (Exception, ), exc:
	    self.error(500)
	    self.write_json({'exception':str(exc)})
Exemplo n.º 2
0
    def get(self):
	try:
	    key = db.Key.from_path('Listing', int(self.path_tail()))
	    exists = Listing.all(keys_only=True).filter('__key__', key).get()
	except (Exception, ), exc:
	    self.error(500)