Method
prepare
(self, escape_func=html_escape, noescape=False, syntax=None, **ka)
Source from the content-addressed store, hash-verified
| 3351 | class SimpleTemplate(BaseTemplate): |
| 3352 | |
| 3353 | def prepare(self, escape_func=html_escape, noescape=False, syntax=None, **ka): |
| 3354 | self.cache = {} |
| 3355 | enc = self.encoding |
| 3356 | self._str = lambda x: touni(x, enc) |
| 3357 | self._escape = lambda x: escape_func(touni(x, enc)) |
| 3358 | self.syntax = syntax |
| 3359 | if noescape: |
| 3360 | self._str, self._escape = self._escape, self._str |
| 3361 | |
| 3362 | @cached_property |
| 3363 | def co(self): |
Callers
nothing calls this directly
Tested by
no test coverage detected