23 lines
321 B
Markdown
23 lines
321 B
Markdown
# Plugin development
|
|
|
|
## Filter example
|
|
|
|
```
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
# Some more imports
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
def myfilter(myinput):
|
|
return myinput + 1
|
|
|
|
|
|
class FilterModule(object):
|
|
|
|
def filters(self):
|
|
return {
|
|
'myfilter': myfilter,
|
|
}
|
|
``` |