def __init__(self, _environment_, *args, **kwargs):
self.environment = _environment_
- self._stack = [self.environment.globals, dict(*args, **kwargs), {}, {}]
+ self._stack = [self.environment.globals, dict(*args, **kwargs), {}]
self.globals, self.initial, self.current = self._stack
# cache object used for filters and tests
def process(environment, node):
translator = PythonTranslator(environment, node)
+ filename = node.filename or '<template>'
return Template(environment,
- compile(translator.translate(), node.filename, 'exec'))
+ compile(translator.translate(), filename, 'exec'))
process = staticmethod(process)
# -- private methods