mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
improve example of custom filter settings
This commit is contained in:
parent
fb07f4d513
commit
22f942e531
1 changed files with 3 additions and 0 deletions
|
|
@ -93,7 +93,10 @@ Basic settings
|
||||||
should map the filtername to the filter function.
|
should map the filtername to the filter function.
|
||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
import sys
|
||||||
|
sys.path.append('.')
|
||||||
|
|
||||||
|
from custom_filter import urlencode_filter
|
||||||
JINJA_FILTERS = {'urlencode': urlencode_filter}
|
JINJA_FILTERS = {'urlencode': urlencode_filter}
|
||||||
|
|
||||||
See `Jinja custom filters documentation`_.
|
See `Jinja custom filters documentation`_.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue