File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,21 @@ def node_render(context):
9797
9898 return tag_func
9999
100+ # have to export the original jinja visit Extends
101+ # in the case jinja tags are being overriden
100102jinja_visit_Extends = None
101103
102104def override_jinja_tags ():
105+ """
106+ Overrides jinja extends and include tags for use in your pattern library.
107+ Call it in your settings to override tags
108+ """
103109 global jinja_visit_Extends
104110 try :
105111 from jinja2 .compiler import CodeGenerator as JinjaCodeGenerator
106112 from jinja2 .environment import Template as JinjaTemplate
107113 except ModuleNotFoundError :
108- ModuleNotFoundError ("install jinja2 to override tags" )
114+ ModuleNotFoundError ("install jinja2 to override jinja tags" )
109115
110116 from .loader_tags import template_new_context , visit_extends
111117 jinja_visit_Extends = JinjaCodeGenerator .visit_Extends
You can’t perform that action at this time.
0 commit comments