예제 #1
0
 def render(self, context):
     """
     Three block groups are fetched separately and rendered in increasing priority:
         - site blocks (no content)
         - section related blocks
         - content related blocks
     """
     request = context.get('request', None)
     try:
         content = context.get('content', None)
         section = context.get('section', None)
         blocks = get_all_blocks_to_display(self.place, content, section)
         result = _render_blocks(request, blocks, content, section, self.place, "block", self.nondraggable, context, self.noncontained)
         return result
     except template.VariableDoesNotExist:
         return ''
예제 #2
0
 def render(self, context):
     """
     Three block groups are fetched separately and rendered in increasing priority:
         - site blocks (no content)
         - section related blocks
         - content related blocks
     """
     request = context.get('request', None)
     try:
         content = context.get('content', None)
         section = context.get('section', None)
         blocks = get_all_blocks_to_display(self.place, content, section)
         result = _render_blocks(request, blocks, content, section,
                                 self.place, "block", self.nondraggable,
                                 context, self.noncontained)
         return result
     except template.VariableDoesNotExist:
         return ''
예제 #3
0
파일: tests.py 프로젝트: teury/merengueproj
def get_rendered_blocks(place=None, content=None, section=None):
    blocks = get_all_blocks_to_display(place, content, section)
    return [
        reg_block.get_registry_item().render(None, None, None)
        for reg_block in blocks
    ]
예제 #4
0
def get_rendered_blocks(place=None, content=None, section=None):
    blocks = get_all_blocks_to_display(place, content, section)
    return [reg_block.get_registry_item().render(None, None, None) for reg_block in blocks]