Example #1
0
    def _get_reindex(self, par):
        q = Content.all()
        q.filter('status =', 'published')

        # date, author, content, title):
        search = BlogSearch()

        count = 0
        for c in q:
            count = count + 1
            search.insert_document(search.create_document(
                c.key().name(),
                c.sortdate,
                c.author.displayname,   
                c.current.content,
                c.current.title,
                c.group.title
            ))

        self._respond(["reindex"], opt={"count":count}) 
Example #2
0
    def _get_blog(self, par, xml=False):
        """ all blog articles """

        q = Content.all();
        self._obj['title'] = self._conf.BLOG_TITLE
        self._get_blog_list(q, xml)