2👍
✅
The reason this raises an error is because the URL has a pk
parameter, and you thus need to provide a value for that in order to define the URL path.
You can pass the value of named parameters with the kwarg=…
parameter, so:
reverse('designs:designer-detail', kwargs={'pk': 42})
where 42
is the primary key of the item for which you want to obtain details.
Source:stackexchange.com