MCPcopy
hub / github.com/django/django / get_contents

Method get_contents

django/template/loaders/filesystem.py:20–25  ·  view source on GitHub ↗
(self, origin)

Source from the content-addressed store, hash-verified

18 return self.dirs if self.dirs is not None else self.engine.dirs
19
20 def get_contents(self, origin):
21 try:
22 with open(origin.name, encoding=self.engine.file_charset) as fp:
23 return fp.read()
24 except FileNotFoundError:
25 raise TemplateDoesNotExist(origin)
26
27 def get_template_sources(self, template_name):
28 """

Callers

nothing calls this directly

Calls 2

readMethod · 0.45

Tested by

no test coverage detected