【发布时间】:2011-02-25 07:47:10
【问题描述】:
我有一个应用程序,在我的 urls.py 中有类似的东西:
urlpatterns = patterns('',
url(r'^profile_view/(?P<id>\d+)/$',
profile_view,
name='profile_view'),)
表示 profile_view 函数有 id 作为参数。 现在,我想从我的模板中调用该函数,使用像回复这样的链接
问题是我不知道如何使用上面的 url 作为链接,这意味着我如何“将 id 参数传递给链接”? 谢谢
【问题讨论】:
标签: django url view hyperlink parameters