예제 #1
0
def render_current_page(request):
    # TODO it would be nice, in theory, if there were a little plugin-scoped
    # bucket for storing data in, in case there's something expensive that
    # multiple blocks need
    latest_page = get_recent_pages().first()

    adjacent_pages = get_adjacent_pages(latest_page, include_queued=False)

    return dict(
        page=latest_page,
        adjacent_pages=adjacent_pages,
    )
예제 #2
0
파일: plugin.py 프로젝트: eevee/spline
def render_current_page(request):
    # TODO it would be nice, in theory, if there were a little plugin-scoped
    # bucket for storing data in, in case there's something expensive that
    # multiple blocks need
    latest_page = get_recent_pages().first()

    adjacent_pages = get_adjacent_pages(latest_page, include_queued=False)

    return dict(
        page=latest_page,
        adjacent_pages=adjacent_pages,
    )
예제 #3
0
def offer_blocks(event):
    # TODO this used to get the most recent page from each comic, but that's a
    # concept that's going away.  is there still some useful way to have
    # multiple blocks like that?
    # TODO does this need a date filter too?  do something else if it's too
    # old...?
    recent_pages = get_recent_pages().limit(3)

    block = FrontPageBlock(
        renderer='spline_comic:templates/_lib#front_page_block.mako',
        recent_pages=recent_pages,
    )
    event.blocks.append(block)
예제 #4
0
파일: plugin.py 프로젝트: eevee/spline
def offer_blocks(event):
    # TODO this used to get the most recent page from each comic, but that's a
    # concept that's going away.  is there still some useful way to have
    # multiple blocks like that?
    # TODO does this need a date filter too?  do something else if it's too
    # old...?
    recent_pages = get_recent_pages().limit(3)

    block = FrontPageBlock(
        renderer='spline_comic:templates/_lib#front_page_block.mako',
        recent_pages=recent_pages,
    )
    event.blocks.append(block)
예제 #5
0
def populate_feed(event):
    # TODO this needs date filter, limiting
    pages = get_recent_pages()
    event.add_feed_items(*pages)
예제 #6
0
파일: plugin.py 프로젝트: eevee/spline
def populate_feed(event):
    # TODO this needs date filter, limiting
    pages = get_recent_pages()
    event.add_feed_items(*pages)