MCPcopy
hub / github.com/django/django / bind_template

Method bind_template

django/template/context.py:156–163  ·  view source on GitHub ↗
(self, template)

Source from the content-addressed store, hash-verified

154
155 @contextmanager
156 def bind_template(self, template):
157 if self.template is not None:
158 raise RuntimeError("Context is already bound to a template")
159 self.template = template
160 try:
161 yield
162 finally:
163 self.template = None
164
165 def __copy__(self):
166 duplicate = super().__copy__()

Callers 2

renderMethod · 0.45
renderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected