Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Commit f2084ab

Browse files
committed
Humanize dates in french
1 parent f1f3fde commit f2084ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

HoH/filters.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
@app.template_filter('time_ago')
66
def natural_datetime(dt):
7-
return humanize.naturaltime(datetime.utcnow() - dt)
7+
humanize.i18n.activate('fr_FR')
8+
9+
return humanize.naturaltime(datetime.now() - dt)

0 commit comments

Comments
 (0)