MCPcopy Create free account
hub / github.com/EasyIME/PIME / render

Method render

python/python3/tornado/web.py:3312–3325  ·  view source on GitHub ↗
(self, path: str, **kwargs: Any)

Source from the content-addressed store, hash-verified

3310 self._resource_dict = {} # type: Dict[str, Dict[str, Any]]
3311
3312 def render(self, path: str, **kwargs: Any) -> bytes: # type: ignore
3313 def set_resources(**kwargs) -> str: # type: ignore
3314 if path not in self._resource_dict:
3315 self._resource_list.append(kwargs)
3316 self._resource_dict[path] = kwargs
3317 else:
3318 if self._resource_dict[path] != kwargs:
3319 raise ValueError(
3320 "set_resources called with different "
3321 "resources for the same template"
3322 )
3323 return ""
3324
3325 return self.render_string(path, set_resources=set_resources, **kwargs)
3326
3327 def _get_resources(self, key: str) -> Iterable[str]:
3328 return (r[key] for r in self._resource_list if key in r)

Callers

nothing calls this directly

Calls 1

render_stringMethod · 0.45

Tested by

no test coverage detected