#在使用url标签的时候,需要给该url传递一个参数
views.py def book(request,book_id): return pass urls.py path('book/<book_id>',views.book,name='book') book.html<a href="{% url 'book' book_id ='1' %}">最火的图书</a>