Return an attribute node for the current extension. This is useful to pass constants on extensions to generated template code. :: self.attr('_my_attribute', lineno=lineno)
(self, name, lineno=None)
| 107 | raise NotImplementedError() |
| 108 | |
| 109 | def attr(self, name, lineno=None): |
| 110 | """Return an attribute node for the current extension. This is useful |
| 111 | to pass constants on extensions to generated template code. |
| 112 | |
| 113 | :: |
| 114 | |
| 115 | self.attr('_my_attribute', lineno=lineno) |
| 116 | """ |
| 117 | return nodes.ExtensionAttribute(self.identifier, name, lineno=lineno) |
| 118 | |
| 119 | def call_method(self, name, args=None, kwargs=None, dyn_args=None, |
| 120 | dyn_kwargs=None, lineno=None): |