TemplateDoesNotExist at /cart/

Hi,

This is my first time posting in the djangoproject forum. I’m getting the following error when I’m creating the Django Shopping Cart in Web Page App.

TemplateDoesNotExist at /cart/

The path is given in views.py is provided by the following. In addition to cart.html, index.html is also placed in the cart folder.

The screenshot code shown above and the others were originally acquired from the adding shopping cart in web page tutorial link from GeeksForGeeks.

https://www.geeksforgeeks.org/how-to-add-cart-in-a-web-page-using-django/.

Please have a look at the screenshot and the tutorial link and let me know how to fix the Template problem. Thank You.

Thank You.

Welcome @SouvikUMD !

First, please do not post images of code or other text information here. Copy/paste the code into the body of your post, with the code marked as “Preformatted text” (Have a line of ``` before and after the code.)

Second, when you’re asking for assistance with an error, post the complete error with the full traceback in your post.

Third, if you’re following a tutorial, I would suggest that you follow the tutorial exactly. Do not make changes to what the tutorial is teaching you to do without understanding what those changes are going to affect.

Finally, explain the directory layout of your project. Where are these template files within your project?