Can't get kwargs to work for format.
Documentation says that this function signature is:
format(value, *args, **kwargs)
So my template is:
{{ '%(foo)s — %(bar)s' | format(foo=1, bar=2) }}
I'm getting TypeError while trying to run it:
File "/<erased>/.venv/local/lib/python2.7/site-packages/jinja2/filters.py", line 545, in do_format
return soft_unicode(value) % (kwargs or args)
TypeError: format requires a mapping
And it's normal because kwargs in do_format filter doesn't get filled at all.
What am I doing wrong?
Can't get kwargs to work for
format.Documentation says that this function signature is:
So my template is:
I'm getting
TypeErrorwhile trying to run it:And it's normal because
kwargsindo_formatfilter doesn't get filled at all.What am I doing wrong?