Exemple #1
0
def list_notes():
    '''
    查询博文列表
    '''

    # 渲染博文列表页面目标文件,传入blogs参数
    return render_template('list_blogs.html', blogs=blogs)
Exemple #2
0
 def query_note(id):
     blog = None
     # 到数据库查询博文详情
     for blg in blogs:
         if blg.id == int(id):
             blog = blg
     # 渲染博文详情页面
     return render_template('query_blog.html', blog=blog)
Exemple #3
0
def query_note(id):
    '''
    查询博文详情、删除博文
    :param id:
    :return:
    '''
    blog = None
    # 到数据库中查询博文详情
    for blg in blogs:
        if blg.id == int(id):
            blog = blg

    return render_template('query_blog.html',blog = blog)
Exemple #4
0
def home():
    """
    主页
    """
    return render_template('home.html')
Exemple #5
0
def blog1(id):
    blog = None
    for blg in blogs:
        if blg.id == int(id):
            blog = blg
    return render_template('query_blog.html', blog = blog)
Exemple #6
0
def blogs1():
    return render_template('list_blogs.html',blogs = blogs)
Exemple #7
0
def home():
    return render_template('home.html')
Exemple #8
0
def home():
    '''
    主页
    '''
    # 渲染首页HTML模板文件
    return render_template('home.html')
Exemple #9
0
 def list_notes():
     return render_template('list_blogs.html', blogs=blogs)
Exemple #10
0
 def home():
     return render_template('index.html')