def blog_hot(page=1): # return "Hello, World!\nBlog Hot!" from blog import get_blog_rows per_page = 8 pagination = get_blog_rows(page, per_page) return render_template('blog/hot.html', title='blog_hot', pagination=pagination)
def blog_list_edit(page=1): """ 博客列表(带编辑) """ # return "Hello, World!\nBlog List!" from blog import get_blog_rows per_page = 8 pagination = get_blog_rows(page, per_page) return render_template('blog/list_edit.html', title='blog_list', pagination=pagination)
def blog_hot(page=1): """ 热门博客 """ # return "Hello, World!\nBlog Hot!" from blog import get_blog_rows per_page = 8 pagination = get_blog_rows(page, per_page) return render_template('blog/hot.html', title='blog_hot', pagination=pagination)
def blog_new(page=1): # return "Hello, World!\nBlog New!" from blog import get_blog_rows, get_blog_list_counter, get_blog_list_container_status per_page = 8 pagination = get_blog_rows(page, per_page) id_list = [item.id for item in pagination.items] blog_counter_list = get_blog_list_counter(id_list) # 状态设置 login_user_id = g.user.get_id() blog_container_status_list = get_blog_list_container_status( id_list, login_user_id) return render_template( 'blog/new.html', title='blog_new', pagination=pagination, blog_counter_list=blog_counter_list, blog_container_status_list=blog_container_status_list)
def blog_new(page=1): """ 最新博客 """ # return "Hello, World!\nBlog New!" from blog import get_blog_rows, get_blog_list_counter, get_blog_list_container_status per_page = 8 pagination = get_blog_rows(page, per_page) id_list = [item.id for item in pagination.items] blog_counter_list = get_blog_list_counter(id_list) # 状态设置 login_user_id = g.user.get_id() blog_container_status_list = get_blog_list_container_status(id_list, login_user_id) return render_template( 'blog/new.html', title='blog_new', pagination=pagination, blog_counter_list=blog_counter_list, blog_container_status_list=blog_container_status_list )