Updated READMED with documentation about builtin filters.
This commit is contained in:
parent
a0c9478e72
commit
b1d781441c
1 changed files with 18 additions and 4 deletions
14
README.md
14
README.md
|
|
@ -57,6 +57,20 @@ Secretary will handle multiline variable values replacing the line breaks with a
|
||||||
To be documented...
|
To be documented...
|
||||||
|
|
||||||
|
|
||||||
|
### Builtin Filters
|
||||||
|
Secretary includes some predefined *jinja2* filters. Included filters are:
|
||||||
|
|
||||||
|
- **markdown(value)**
|
||||||
|
Convert the value, a markdown formated string, into a ODT formated text. Example:
|
||||||
|
|
||||||
|
{{ invoice.description|markdown }}
|
||||||
|
|
||||||
|
- **pad(value, length)**
|
||||||
|
Pad zeroes to `value` to the left until output value's length be equal to `length`. Default length if 5. Example:
|
||||||
|
|
||||||
|
{{ invoice.number|pad(6) }}
|
||||||
|
|
||||||
|
|
||||||
[1]: http://jinja.pocoo.org/docs/templates/
|
[1]: http://jinja.pocoo.org/docs/templates/
|
||||||
[2]: https://github.com/mirkonasato/pyodconverter
|
[2]: https://github.com/mirkonasato/pyodconverter
|
||||||
[3]: http://jinja.pocoo.org/docs/api/#jinja2.Environment
|
[3]: http://jinja.pocoo.org/docs/api/#jinja2.Environment
|
||||||
Loading…
Add table
Add a link
Reference in a new issue