# Issues with the url tag

**URL:** <https://forum.djangoproject.com/t/issues-with-the-url-tag/35873>\
**Category:** Templates & Frontend\
**Created:** [October 23, 2024, 2:08am UTC](https://forum.djangoproject.com/t/issues-with-the-url-tag/35873 "2024-10-23T02:08:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![harryjsaddler](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/harryjsaddler/32/20601_2.png) [@harryjsaddler](https://forum.djangoproject.com/u/harryjsaddler)\
**Post date:** [October 23, 2024, 2:08am UTC](https://forum.djangoproject.com/t/issues-with-the-url-tag/35873/1 "2024-10-23T02:08:42Z")

</div>

Given:

`path("<int:artwork_id>/edit", views.catalog_edit, name="catalog_edit"),`

Why does this url tag:

`<button><a href="{% url 'catalog_edit' artwork.id 'edit' %}">Edit</a></button>`

Fail with this error?

`django.urls.exceptions.NoReverseMatch: Reverse for 'catalog_edit' with arguments '(717, 'edit')' not found. 3 pattern(s) tried: ['catalog/(?P<artwork_id>[0-9]+)/edit/catalog_detail\\Z', 'catalog/(?P<artwork_id>[0-9]+)/edit\\Z', 'catalog/(?P<artwork_id>[0-9]+)\\Z']`

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 23, 2024, 2:15am UTC](https://forum.djangoproject.com/t/issues-with-the-url-tag/35873/2 "2024-10-23T02:15:27Z")

</div>

Your url only takes one parameter. There’s no need for the string ‘edit’ in that tag.

---

<div class="post-metadata">

**Author:** ![harryjsaddler](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/harryjsaddler/32/20601_2.png) [@harryjsaddler](https://forum.djangoproject.com/u/harryjsaddler)\
**Post date:** [October 23, 2024, 9:10pm UTC](https://forum.djangoproject.com/t/issues-with-the-url-tag/35873/3 "2024-10-23T21:10:52Z")

</div>

Comment redacted for now…

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 23, 2024, 11:02pm UTC](https://forum.djangoproject.com/t/issues-with-the-url-tag/35873/4 "2024-10-23T23:02:53Z")

</div>

There’s something else that I think I just noticed as a possible issue - do you have more than one `path` definition using the name `catalog_edit`? If so, that’s a mistake. Each `path` definition should have a unique name. (This is in addition to ensuring that you’re passing the right number of parameters to the `url` tag.)

---

<div class="post-metadata">

**Author:** ![harryjsaddler](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/harryjsaddler/32/20601_2.png) [@harryjsaddler](https://forum.djangoproject.com/u/harryjsaddler)\
**Post date:** [October 25, 2024, 12:39am UTC](https://forum.djangoproject.com/t/issues-with-the-url-tag/35873/5 "2024-10-25T00:39:48Z")

</div>

Hi Ken. That wasn’t the issue (another path was grabbing the url, didn’t notice it), but thanks for the suggestion… I didn’t know that each path needs its own description. Makes sense.
