equal
deleted
inserted
replaced
214 extension, if an instance named as 'templatefilter' is used for |
214 extension, if an instance named as 'templatefilter' is used for |
215 decorating in extension. |
215 decorating in extension. |
216 |
216 |
217 Otherwise, explicit 'templatefilters.loadkeyword()' is needed. |
217 Otherwise, explicit 'templatefilters.loadkeyword()' is needed. |
218 """ |
218 """ |
|
219 |
|
220 class templatefunc(_templateregistrarbase): |
|
221 """Decorator to register template function |
|
222 |
|
223 Usage:: |
|
224 |
|
225 templatefunc = registrar.templatefunc() |
|
226 |
|
227 @templatefunc('myfunc(arg1, arg2[, arg3])') |
|
228 def myfuncfunc(context, mapping, args): |
|
229 '''Explanation of this template function .... |
|
230 ''' |
|
231 pass |
|
232 |
|
233 The first string argument is used also in online help. |
|
234 |
|
235 'templatefunc' instance in example above can be used to |
|
236 decorate multiple functions. |
|
237 |
|
238 Decorated functions are registered automatically at loading |
|
239 extension, if an instance named as 'templatefunc' is used for |
|
240 decorating in extension. |
|
241 |
|
242 Otherwise, explicit 'templater.loadfunction()' is needed. |
|
243 """ |
|
244 _getname = _funcregistrarbase._parsefuncdecl |