예제 #1
0
파일: master.py 프로젝트: erwan/firenomics
 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')
예제 #2
0
파일: main.py 프로젝트: erwan/firenomics
 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)