Internal helper function to create a derived context. This is used in situations where the system needs a new context in the same template that is independent.
(self, locals=None)
| 266 | 'StopIteration exception') |
| 267 | |
| 268 | def derived(self, locals=None): |
| 269 | """Internal helper function to create a derived context. This is |
| 270 | used in situations where the system needs a new context in the same |
| 271 | template that is independent. |
| 272 | """ |
| 273 | context = new_context(self.environment, self.name, {}, |
| 274 | self.get_all(), True, None, locals) |
| 275 | context.eval_ctx = self.eval_ctx |
| 276 | context.blocks.update((k, list(v)) for k, v in iteritems(self.blocks)) |
| 277 | return context |
| 278 | |
| 279 | def _all(meth): |
| 280 | proxy = lambda self: getattr(self.get_all(), meth)() |
nothing calls this directly
no test coverage detected