Beispiel #1
0
 def get(self):
     data = {
         'title': 'Admin | 博客',
         'blogs': Blog.get_all_blog(),
         'tags': BlogTags.get_all_tags(),
         'category': BlogCategory.get_all_category()
     }
     self.render('admin/admin_blog.html', **data)
Beispiel #2
0
def get_all_blog(username):
    blogs = Blog.get_all_blog(username)
    return jsonify([blog.to_json() for blog in blogs])