Beispiel #1
0
def paper(paper_id):
    model = Model()
    paper_list = model.get_all_paper()
    max_paper = model.get_max_paper()
    try:
        pic_info = model.get_pic_info(paper_id)
        article_list = model.get_article_list(pic_info.id)
        page_id = pic_info.id
    except IndexError, e:
        return "该报纸页面不存在!"
Beispiel #2
0
def index():
    model = Model()
    paper_list = model.get_all_paper()  # 获得所有期数列表
    max_paper = model.get_max_paper()
    paper_id = max_paper.id
    try:
        pic_info = model.get_pic_info(paper_id)
        print pic_info
        article_list = model.get_article_list(pic_info.id)
        page_id = pic_info.id
    except IndexError, e:
        return "so sad,the page has gone"