improve example of custom filter settings

This commit is contained in:
cropse 2017-03-27 14:44:01 +08:00
commit 22f942e531

View file

@ -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`_.