Beispiel #1
0
 def get(self, n=1):
     page_limit = 25
     now, list_limit, offset = limit_offset(n, page_limit)
     feed_list, count = feed_import_list_count_by_part_time_job(
         list_limit, offset)
     page = str(Page('/feed_import/log-%s', count, now, page_limit))
     self.render(page=page, feed_list=feed_list)
Beispiel #2
0
def search_get(self, n=1):
    page_limit = getattr(self, 'PAGE_LIMIT', PAGE_LIMIT)
    q = self.get_argument('q', '')
    if q:
        try:
            q = q.decode('utf-8')
        except UnicodeDecodeError:
            q = q.decode('gb18030')

        q = q.encode('utf-8')
        now, list_limit, offset = limit_offset(
            n,
            page_limit
        )

        zsite_list, total = self.search(q, offset, list_limit)
        page = str(Page(
            getattr(self, 'link', '/q-%%s?q=%s') % quote(q).replace('%', '%%'),
            total,
            now,
            page_limit
        ))

        self.render(
            q=q,
            page_list=zsite_list,
            total=total,
            page=page,
        )
    else:
        self.render(q=None)
Beispiel #3
0
    def get(self, n=1):

        page_limit = 200
        now, list_limit, offset = limit_offset(n, page_limit)
        tag_id_name_count_list, count = tag_id_name_count_list_by_tag_admin(
            list_limit, offset)

        page = str(Page('/feed_import-%s', count, now, page_limit))

        self.render(tag_id_name_count_list=tag_id_name_count_list, page=page)
 def get(self, n=1):
     page_limit = 25
     now, list_limit, offset = limit_offset(
         n,
         page_limit
     )
     feed_list, count = feed_import_list_count_by_part_time_job(list_limit, offset)
     page = str(Page(
         '/feed_import/log-%s',
         count,
         now,
         page_limit
     ))
     self.render(page=page, feed_list=feed_list)
    def get(self, n=1):

        page_limit = 200
        now, list_limit, offset = limit_offset(
            n,
            page_limit
        )
        tag_id_name_count_list, count = tag_id_name_count_list_by_tag_admin(list_limit, offset)

        page = str(Page(
            '/feed_import-%s',
            count,
            now,
            page_limit
        ))

        self.render(
            tag_id_name_count_list=tag_id_name_count_list,
            page=page
        )