problem in update/delete view

Or, instead of the above, do you really need the Goods pk in the url?

You may be able to do this:

<a href="{% url 'edit_comment'  'pk':comment.pk %}">ویرایش</a> | 
<a href="{% url 'delete_comment'  'pk':comment.pk%}">حذف</a>

and not change your urls.