def real_get(self): s= "The following TileSets (shape files) have are available for use:<br>" #logging.info('looking for tilesets') for ts in TileSet.all(): #logging.info(ts) if ts.public: s+= "<p>Name: " s+= "<a href='/m/?ts=%s'>%s</a>"%(ts.name,ts.name) s+= "</p>" self.response.out.write(s)
def real_get(self,tsid=''): if tsid: if tsid.startswith('ts:'): self.tsid = tsid else: self.tsid = 'ts:'+tsid ts = self.ts if ts: return self.write(ts.as_dict()) else: return self.write({"error":"TileSet Not Found"}) else: return self.write({'public':[ts for ts in TileSet.all(keys_only=True)]})