-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter 7: context processors does not work #62
Comments
Yeah! i solved that! the book has a too much bad code with syntax errors. On of them is the name of context processors. In book: "context_ processors.py" but the right is "context_processors.py" without that space after underscore. Try this!! and be careful with the codes: too many basic errors |
Hi Antonio, I make the shop on django 3.2 version (as 3.0.9 is no longer supported), I am not getting this context processor to work - despite i did everything by the book, I am getting 'Your cart is empty' in the template despite adding items to the cart. I solved previous error with the wrong filename but here I am not getting why.... This code is so simple :) what can go wrong? Settings:
Shop/templates/shop/base.html:
cart/context_processors.py:
|
When I add this line in my settings to use context processors for using cart info in all templates:
I get ModuleNotFoundError. It says: No module named 'cart.context_processors'.
Does anyone see this error?
The text was updated successfully, but these errors were encountered: