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):
152152 )
153153
154154def 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
156157 except for
157158 self.writeline(
158159 "parent_template.new_context(context.get_all(), True,"
159160 f" {self.dump_local_context(frame)})"
160161 )
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
162164 """
163165 from jinja2 .compiler import CompilerExit
164166
@@ -214,7 +216,10 @@ def template_new_context(
214216 shared = False ,
215217 locals = None , # noqa A002
216218):
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
218223 provided will be passed to the template. Per default the globals
219224 are added to the context. If shared is set to `True` the data
220225 is passed as is to the context without adding the globals.
You can’t perform that action at this time.
0 commit comments