templates: Add django timesince filter to jinja2 filters.

This commit is contained in:
Vishnu Ks 2019-03-04 18:25:32 +05:30 committed by Tim Abbott
parent 51986c27a5
commit 51dcc5fdde
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ from django.contrib.staticfiles.storage import staticfiles_storage
from django.template.defaultfilters import slugify, pluralize
from django.urls import reverse
from django.utils import translation
from django.utils.timesince import timesince
from jinja2 import Environment
from two_factor.templatetags.two_factor import device_action
@ -27,5 +28,6 @@ def environment(**options: Any) -> Environment:
env.filters['pluralize'] = pluralize
env.filters['display_list'] = display_list
env.filters['device_action'] = device_action
env.filters['timesince'] = timesince
return env