Lines Matching refs:blocks
50 def new_context(environment, template_name, blocks, vars=None,
67 return Context(environment, parent, template_name, blocks)
77 blocks = self.__context.blocks[name]
78 return BlockReference(name, self.__context, blocks, 0)
107 'name', 'blocks', '__weakref__')
109 def __init__(self, environment, parent, name, blocks):
117 # create the initial mapping of blocks. Whenever template inheritance
118 # takes place the runtime will update this mapping with the new blocks
120 self.blocks = dict((k, [v]) for k, v in blocks.iteritems())
125 blocks = self.blocks[name]
126 index = blocks.index(current) + 1
127 blocks[index]
132 return BlockReference(name, self, blocks, index)
192 context.blocks.update((k, list(v)) for k, v in self.blocks.iteritems())