MCPcopy
hub / github.com/pallets/jinja / join_path

Method join_path

src/jinja2/environment.py:944–954  ·  view source on GitHub ↗

Join a template with the parent. By default all the lookups are relative to the loader root so this method returns the `template` parameter unchanged, but if the paths should be relative to the parent template, this function can be used to calculate the real template

(self, template: str, parent: str)

Source from the content-addressed store, hash-verified

942 raise rewrite_traceback_stack(source=source)
943
944 def join_path(self, template: str, parent: str) -> str:
945 """Join a template with the parent. By default all the lookups are
946 relative to the loader root so this method returns the `template`
947 parameter unchanged, but if the paths should be relative to the
948 parent template, this function can be used to calculate the real
949 template name.
950
951 Subclasses may override this method and implement template path
952 joining here.
953 """
954 return template
955
956 @internalcode
957 def _load_template(

Callers 2

get_templateMethod · 0.95
select_templateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected