From: Armin Ronacher Date: Mon, 2 Jan 2017 20:39:34 +0000 (+0100) Subject: Force missing to be a local X-Git-Tag: 2.9~30^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05fea281d8348331dde2289deeef7b3dd07958a0;p=thirdparty%2Fjinja.git Force missing to be a local --- diff --git a/jinja2/compiler.py b/jinja2/compiler.py index 04569f3a..fa2c2aea 100644 --- a/jinja2/compiler.py +++ b/jinja2/compiler.py @@ -581,7 +581,8 @@ class CodeGenerator(NodeVisitor): self.writeline('name = %r' % self.name) # generate the root render function. - self.writeline('%s(context%s):' % (self.func('root'), envenv), extra=1) + self.writeline('%s(context, missing=missing%s):' % + (self.func('root'), envenv), extra=1) self.indent() # process the root @@ -614,7 +615,8 @@ class CodeGenerator(NodeVisitor): # at this point we now have the blocks collected and can visit them too. for name, block in iteritems(self.blocks): - self.writeline('%s(context%s):' % (self.func('block_' + name), envenv), + self.writeline('%s(context, missing=missing%s):' % + (self.func('block_' + name), envenv), block, 1) self.indent() # It's important that we do not make this frame a child of the