[Fixed]-Reverse for 'product_list_by_category' with arguments '('books',)' and keyword arguments '{}' not found

1👍

Your url pattern uses \W (uppercase W), which matches everything except alphanumerical characters. You need to change it to lowercase, so that it matches alphanumerical characters:

url(r'^(?P<category_slug>[-\w]+)/$', views.product_list, name='product_list_by_category'),
👤knbk

Leave a comment