from django import template
register=template.Library()

@register.filter
def stringformat(value, fmt='{}'):
   '''
   format the value
   '''
   return fmt.format(value)

from django import template
register=template.Library()

@register.filter
def stringformat(value, fmt='{}'):
   '''
   format the value
   '''
   if isinstance(value, dict):
      return fmt.format(**value)
   return fmt.format(value)

Add named format support if dict
Add named format support if dict
