I've got the following method in my View:
@action(detail=True, methods=['delete'])
def remove(self, request, *args,**kwargs):
print("here")
I've created a test for this endpoint. But haven't been able to get the correct url.
When I do
url = reverse('order-remove', kwargs={'pk':1234, 'product_id':1})
I get the following error:
django.urls.exceptions.NoReverseMatch: Reverse for 'order-remove' with a keyword arguments ... not found. 2 pattern(s) tried: ...
and when I try:
pk=1234
product_id=1
url = reverse('order-remove', args=(pk, product_id,))
I got the following url:
/orders/1234/remove.1
instead of what I'd be expecting which is: orders/1234/remove/4
with an /
instead of .
What am I missing?