def GET(self, kind = 'page'): if kind == 'article': article = Article() article.body = '<!-- content -->' captcha_html = captcha.displayhtml(PUB) return render.articleShow(article, captcha_html, False) else: page = Page() page.body = '<!-- content -->' return render.pageShow(page, 'foo')
def GET(self, slug): admin = users.is_current_user_admin() articles = db.GqlQuery("SELECT * FROM Article WHERE slug = :1", slug) article = articles.get() captcha_html = captcha.displayhtml(PUB) return render.article(article, captcha_html, admin)