-
#—libs/date.py
-
def format_date(value, format=“%d/%m/%Y %H:%M:%S”):
-
ย ย ย ย return value.strftime(format)
-
#—–settings
-
from libs.filters import format_date
-
from jinja2 import Environment, FileSystemLoader
-
TEMPLATE_ENV.filters[“format_date”] = format_date
-
#—template
-
<td>{{ h.date|format_date(‘%d/%m/%Y’) }}</td>