Skip to content
Myr

Update oudated CutomLoader code example (#1185)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

py3 for CustomLoader example

authored by Xinbin Huang · committed by GitHub · parent 169b676 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/jinja2/loaders.py+2 added-2 removed
53 unmodified lines
54 path = join(self.path, template)55 if not exists(path):56 raise TemplateNotFound(template)57 mtime = getmtime(path)58 with file(path) as f:59 source = f.read().decode('utf-8')58 with open(path) as f:59 source = f.read()60 return source, path, lambda: mtime == getmtime(path)61 """6263 #: if set to `False` it indicates that the loader cannot provide access
498 unmodified lines