2👍
First you should define the year pattern in the url:
url(r'^(?P<year>\d{4})/$', 'post_archive_year', name='blog_archive_year')
To print the current year in a template use:
{% now Y %}
Source:stackexchange.com
2👍
First you should define the year pattern in the url:
url(r'^(?P<year>\d{4})/$', 'post_archive_year', name='blog_archive_year')
To print the current year in a template use:
{% now Y %}