You can pass the relevant arguments in url tag, if your url (in urls.py) has any capturing group.url(r'^set/(?P<the_city>\w+)/$', views.selectCity, {'the_city': 'gye'}, name='ciudad'),然后进入模板:<a tabindex="-1" href="{% url ciudad the_city='gye' %}">Guayaquil</a> 这篇关于Django url参数和反向URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!