Willy Nelson Willy Nelson - 4 months ago 26x
Python Question

How to display the current year in a Django template?

What is the inbuilt template tag to display the present year dynamically. Like "2011" what would be the template tag to display that?


The full tag to print just the current year is {% now "Y" %}. Note that the Y must be in quotes.