Pylons Quickie: I want to use distance_of_time_in_words
May 17, 2009 § Leave a comment
distance_of_time_in_words is a useful function that converts boring looking datetime into something more attractive (and SEO optimized) like: 30 seconds ago.
Pylons gain this functionality via WebHelper which blatantly inspired by Rails.
But, out of the box, this functionality does not exists in my templates. To enable it, I need to add this line in helpers.py:
from webhelpers.date import distance_of_time_in_words