Re: Dynamic age count

2008-12-24 Thread join.toget...@gmail.com
Look at the timesince filter in django's source for an example, as it does almost exactly what you're looking for. On Dec 23, 8:53 am, Alfonso wrote: > Hi, > > Trying to implement a very simple template tag that will output a > company's age.  So idea being if company was established in 1860 the

Re: Dynamic age count

2008-12-23 Thread Rajesh Dhawan
On Dec 23, 9:53 am, Alfonso wrote: > Hi, > > Trying to implement a very simple template tag that will output a > company's age. So idea being if company was established in 1860 then > it should output '148 years old' if my math is right ;-) > > this is what I've got: > > from django.template i

Dynamic age count

2008-12-23 Thread Alfonso
Hi, Trying to implement a very simple template tag that will output a company's age. So idea being if company was established in 1860 then it should output '148 years old' if my math is right ;-) this is what I've got: from django.template import * register = Library() @register.filter def a