1đź‘Ť
Rahul’s answer is correct, timesince
does not support “seconds” output.
But Django’s Humanize template filter library has naturaltime
which should do what you’re after.
To use it, in your template:
<!-- At the top of your file -->
{% load humanize %}
<!-- then.. -->
{{ date_time_value|naturaltime }}
See the humanize docs.
👤Darian Moody
0đź‘Ť
Django timesince
template tag does not provide the functionality of displaying seconds
also. The smallest unit used is minutes
.
From timesince
documentation:
Minutes is the smallest unit used, and
“0 minutes”
will be returned
for any date that is in the future relative to the comparison point.
👤Rahul Gupta
Source:stackexchange.com