Method
prepare
(self,
escape_func=html_escape,
noescape=False,
syntax=None, **ka)
Source from the content-addressed store, hash-verified
| 4339 | |
| 4340 | class SimpleTemplate(BaseTemplate): |
| 4341 | def prepare(self, |
| 4342 | escape_func=html_escape, |
| 4343 | noescape=False, |
| 4344 | syntax=None, **ka): |
| 4345 | self.cache = {} |
| 4346 | enc = self.encoding |
| 4347 | self._str = lambda x: touni(x, enc) |
| 4348 | self._escape = lambda x: escape_func(touni(x, enc)) |
| 4349 | self.syntax = syntax |
| 4350 | if noescape: |
| 4351 | self._str, self._escape = self._escape, self._str |
| 4352 | |
| 4353 | @cached_property |
| 4354 | def co(self): |
Callers
nothing calls this directly
Tested by
no test coverage detected