예제 #1
0
 def get(self):
     from global_info import recent_blogs
     from article.blog import Blog
     page = RegisterPage(self)
     page['blog_list'] = [each.obj_info_view_by() 
                 for each in Blog.by_ids(recent_blogs.get_slice(-20))]
     return page.render()
예제 #2
0
 def get(self):
     handler_page = RSSRecentBlogPage(self)
     blogs = sorted(Blog.by_ids(recent_blogs.get_slice(-10)))
     handler_page['items'] = [each.rss_info for each in blogs]
     handler_page.init_page()
     handler_page.render()
     return  #0
예제 #3
0
    def get(self):
        from global_info import recent_blogs
        from article.blog import Blog

        page = RegisterPage(self)
        page["blog_list"] = [each.obj_info_view_by() for each in Blog.by_ids(recent_blogs.get_slice(-20))]
        return page.render()
예제 #4
0
 def get(self):
     handler_page = RSSRecentBlogPage(self)
     blogs = sorted(Blog.by_ids(recent_blogs.get_slice(-10)))
     handler_page['items'] = [each.rss_info for each in blogs]
     handler_page.init_page()
     handler_page.render()
     return #0
예제 #5
0
 def get(self):
     handler_page = AtomRecentBlogPage(self)
     blogs = sorted(Blog.by_ids(recent_blogs.get_slice(-10)))
     atominfos = [each.atom_info for each in blogs]
     handler_page.add_entries(*atominfos)
     handler_page.init_page()
     handler_page.render()
     return  #0
예제 #6
0
 def get(self):
     handler_page = AtomRecentBlogPage(self)
     blogs = sorted(Blog.by_ids(recent_blogs.get_slice(-10)))
     atominfos = [each.atom_info for each in blogs]
     handler_page.add_entries(*atominfos)
     handler_page.init_page()
     handler_page.render()
     return #0
예제 #7
0
 def get(self):
     handler_page = AFFeedPage(self)
     usr = self.current_user
     try:
         blogs = sorted(Blog.by_ids(recent_blogs.get_slice(-10)))
     except:
         blogs = []
     handler_page["id_list"] = [str(each) + "##blog" for each in (recent_blogs.load_all()[100:-10][::-1]) if each]
     handler_page["feed_list"] = [each.obj_info_view_by("basic_info", usr=usr, env=None) for each in blogs]
     handler_page.render()
     return  # 0
예제 #8
0
 def get(self):
     handler_page = AFFeedPage(self)
     usr = self.current_user
     try:
         blogs = sorted(Blog.by_ids(recent_blogs.get_slice(-10)))
     except:
         blogs = []
     handler_page['id_list'] = [
         str(each) + '##blog'
         for each in (recent_blogs.load_all()[100:-10][::-1]) if each
     ]
     handler_page['feed_list'] = [
         each.obj_info_view_by('basic_info', usr=usr, env=None)
         for each in blogs
     ]
     handler_page.render()
     return  #0