File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -152,13 +152,15 @@ def do_include(parser, token):
152
152
)
153
153
154
154
def visit_extends (self , node , frame ):
155
- """Dupe of the jinja2.compiler.CodeGenerator visit_Extends
155
+ """This method serves as overriding the jinja extends tag
156
+ Dupe of the jinja2.compiler.CodeGenerator visit_Extends
156
157
except for
157
158
self.writeline(
158
159
"parent_template.new_context(context.get_all(), True,"
159
160
f" {self.dump_local_context(frame)})"
160
161
)
161
- which is how we pull in context from yaml files to extended templates
162
+ which executes at runtime to pull in the dpl context
163
+ Handles visiting extends
162
164
"""
163
165
from jinja2 .compiler import CompilerExit
164
166
@@ -214,7 +216,10 @@ def template_new_context(
214
216
shared = False ,
215
217
locals = None , # noqa A002
216
218
):
217
- """Create a new :class:`Context` for this template. The vars
219
+ """This method serves as overriding the jinja include tag
220
+ Is called as part of Template.render by jinja2 and is updated
221
+ to pull in the dpl context
222
+ Create a new :class:`Context` for this template. The vars
218
223
provided will be passed to the template. Per default the globals
219
224
are added to the context. If shared is set to `True` the data
220
225
is passed as is to the context without adding the globals.
You can’t perform that action at this time.
0 commit comments