Hi, could you help me with this error:
Reverse for 'order_sub' with arguments '()' and keyword arguments '{' request_id ': 53,' code_expert ':' AA-0002 '}' not found. 1 pattern (s) tried: ['request / approve / (? P \ d +) / (? P \ d +) $']
this is the url:
url (r '^ approve / (? P \ d +) / (? P \ d +) $', Orderapp.views.pedido_sub, name="orden_sub"),
and this the button in index where it marks in red the error:
Approve
please wait for your help for this case, thanks in advance! views.py:
def request_sub (request, request_id, cod_expert): art = Articulo.objects.get (id = cod_experto) order = Order.objects.get (id = order_id) if request.method == 'GET': order.estado = 'delivered' order.save () order.date_delivery = datetime.now () order.save () art.stock = order.quantity - art.stock art.save () return redirect ('user: home') return render (request, 'index.html', {'request': request})