Exemplo n.º 1
0
def edit_chapter(chapter_id):
    c = Chapter.find(chapter_id)
    cookie = token_cookie()
    template = render_template(
        "chapter/edit_chapter.html",
        chapter=c,
        token=cookie['token'],
    )
    r = make_response(template)
    r.set_cookie(cookie['token'], cookie['id'], max_age=300)
    return r
Exemplo n.º 2
0
 def get_chapter_name(chapter_id):
     from models.chapter import Chapter
     return Chapter.find(chapter_id).name
Exemplo n.º 3
0
 def get_chapter(self):
     from models.chapter import Chapter
     return Chapter.find(self.chapter_id)