Render the template using keyword arguments as local variables.
(self, *args, **kwargs)
| 4403 | return env |
| 4404 | |
| 4405 | def render(self, *args, **kwargs): |
| 4406 | """ Render the template using keyword arguments as local variables. """ |
| 4407 | env = {} |
| 4408 | stdout = [] |
| 4409 | for dictarg in args: |
| 4410 | env.update(dictarg) |
| 4411 | env.update(kwargs) |
| 4412 | self.execute(stdout, env) |
| 4413 | return ''.join(stdout) |
| 4414 | |
| 4415 | |
| 4416 | class StplSyntaxError(TemplateError): |