You can use Django's built-in template filter timesince
. I think it does exactly what you are describing, if used without argument.
If you want a little more "human" time, for example "an hour ago" instead of "1 hour ago", you can try the naturaltime
filter from django.contrib.humanize
, although it only works for seconds, minutes and hours.