You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Can't get kwargs to work for
format
.Documentation says that this function signature is:
So my template is:
I'm getting
TypeError
while trying to run it:And it's normal because
kwargs
indo_format
filter doesn't get filled at all.What am I doing wrong?
The text was updated successfully, but these errors were encountered: