blob: 8210d89e1d7aa1ded3c547bfacc11ace99a6e8d9 [file] [log] [blame]
Zack Williams3dfe6af2016-04-30 11:37:09 -07001from jinja2.utils import soft_unicode
2
3def format_string(string, pattern):
4 """
5 formats the string with the value passed to it
6 basicaly the reverse order of standard "format()"
7 """
8 return soft_unicode(pattern) % (string)
9
10class FilterModule(object):
11
12 def filters(self):
13 return {
14 'format_string': format_string,
15 }
16