URLdispatch:
url(r'^comment/(?P<slug>[\w-]+)/(?P<comment_pk>)\d+$', comment_delete, name='comment_delete')
查看功能:
def comment_delete(request, gslug, slug, comment_pk):
comment_pk的值是空白的,即使我在模板中的链接中看到了正确的ID号
模板网址标记
{% url 'comment_delete' group_profile.slug discussion.slug comment.pk %}