def get(self):

		model = { 'aliases': Pages.getAliases() }

		self.response.headers['Content-Type'] = "text/xml";

		self.response.out.write(template.render(SITEMAP_PATH, model))
  def get(self, url):

	model = Pages.getPage(url)
	path = model["path"];
	
	if path.startswith('http'):
		
		self.response.headers["Location"] = path
		
		self.response.set_status(301);
		
	else:
		
		if model["debug"] or ("source" not in model):
			
			model["source"] = template.render(path, model)
			
		self.response.out.write(template.render(TEMPLATE_PATH, model))