예제 #1
0
def get_content():
  return {"Post Item":PostItem.all(), "Post Category":PostCategory.all()}
예제 #2
0
 def render(cls, context, * args, ** kwargs):
   post_list = PostItem.all()[:3]
   return cls.render_block(template_name='block_latest.html',
                           block_title=_('Latest post'),
                           context={'post_list': post_list})