7👍
✅
you are not passing the slug in the url but have given a parameter to your pattern.
so change the html
<a href ="{% url 'products:single_product' product.slug %}" class = "btn btn-primary" role = "button">
View Product
</a>
Source:stackexchange.com