10 lines
196 B
Python
10 lines
196 B
Python
from app import app
|
|
|
|
@app.template_filter('date')
|
|
def filter_date(date, format="%Y-%m-%d à %H:%M"):
|
|
"""
|
|
Print a date in a human-readable format.
|
|
"""
|
|
|
|
return date.strftime(format)
|