best_filters.divide

best_filters.divide(val, arg)

Divide by a value

Examples

>>> c = {'myval':50}
>>> t = '{% load best_filters %}{{ myval|divide:2|floatformat:0 }}'
>>> Template(t).render(Context(c))
'25'
>>> c = {'mystr':100}
>>> t = '{% load best_filters %}{{ mystr|divide:3|floatformat:2 }}'
>>> Template(t).render(Context(c))
'33.33'