【发布时间】:2020-07-12 12:08:57
【问题描述】:
<a href="{% url 'news-year-archive' %}">2012 Archive</a>
或者
<a href="/news-year-archive">2012 Archive</a>
两种方法都可行,但哪种方法最适合生产
【问题讨论】:
-
stackoverflow.com/questions/43179875/… 这里有答案,您可以阅读。它将帮助您找到最佳方法
标签: django django-views django-templates