MCPcopy
hub / github.com/django/django / from_string

Method from_string

django/template/engine.py:165–170  ·  view source on GitHub ↗

Return a compiled Template object for the given template code, handling template inheritance recursively.

(self, template_code)

Source from the content-addressed store, hash-verified

163 raise TemplateDoesNotExist(name, tried=tried)
164
165 def from_string(self, template_code):
166 """
167 Return a compiled Template object for the given template code,
168 handling template inheritance recursively.
169 """
170 return Template(template_code, engine=self)
171
172 def get_template(self, template_name):
173 """

Calls 1

TemplateClass · 0.70

Tested by 15

test_textnode_reprMethod · 0.76
test_include_onlyMethod · 0.76
test_filterMethod · 0.76
test_decorated_filterMethod · 0.76
test_load_working_eggMethod · 0.76