예제 #1
0
파일: app.py 프로젝트: Veritas19/kanado
def list_notes():
    '''
    查询博文列表
    '''

    # 渲染博文列表页面目标文件,传入blogs参数
    return render_template('list_blogs.html', blogs=blogs)
예제 #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)
예제 #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)
예제 #4
0
def home():
    """
    主页
    """
    return render_template('home.html')
예제 #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)
예제 #6
0
def blogs1():
    return render_template('list_blogs.html',blogs = blogs)
예제 #7
0
def home():
    return render_template('home.html')
예제 #8
0
파일: app.py 프로젝트: Veritas19/kanado
def home():
    '''
    主页
    '''
    # 渲染首页HTML模板文件
    return render_template('home.html')
예제 #9
0
 def list_notes():
     return render_template('list_blogs.html', blogs=blogs)
예제 #10
0
 def home():
     return render_template('index.html')