0
<a href="{% url 'news-year-archive'  %}">2012 Archive</a>

Or

<a href="/news-year-archive">2012 Archive</a>

Both method is work but which method is best for production

Shatish Desai
  • 575
  • 6
  • 20
  • 1
    https://stackoverflow.com/questions/43179875/when-to-use-django-get-absolute-url-method/43180219 there is an answer here you can read it. it will help you with the best approach – ngawang13 Jul 13 '20 at 06:12

1 Answers1

1

because both method work fine on local and server the method that is shorter is better ;

babak gholamirad
  • 407
  • 4
  • 10