django template tag to display current year
To display the current year using Django template tag, follow these steps:
In the Django template file, add the following import at the top: {% load tz %}
Then, use the following code to display the current year: {{ value|date:"Y" }}
The "value" represents the current date and time, and the "|date:"Y"" filter formats it to display the current year.