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
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
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
3 matches
Mail list logo