def show(self, title): page = self.page_q.filter_by(title=title).first() if page: c.content = page.get_wiki_content() return render('/pages/show.mako') elif wikiwords.match(title): return render('/pages/new.mako') abort(404)
def edit(self, title): c.title = title c.content = u'' page = self.page_q.filter_by(title=title).first() if page: c.title = page.title c.content = page.content return render('/pages/edit.mako')
def index(self): c.titles = [page.title for page in self.page_q.all()] return render('/pages/index.mako')
def index(self): return render('/envirodump.mako')