[Answered ]-Django reverse error NoReverseMatch

2👍

It doesn’t resolve, because your url pattern actually hard-codes the order value (it will always be ‘0’).

You have to provide a way to change the order value from within the URL itself.

To be precise:

urls.py

url(r'^review/$', 'checkout.views.review', {'order':'0'},  name="order-review-default-fallback"),
url(r'^review/(?P<order>[\d]+)/$', 'checkout.views.review', {},  name="order-review"),

should solve your problem.

Leave a comment