1👍
✅
TypeError: 'bool' object is not callable
is shown when you are trying to behave an object like it is a method or function.
In your second line
if request.user.is_authenticated():
Change it to
if request.user.is_authenticated:
Because it’s not callable
1👍
The error is clear:
TypeError: 'bool' object is not callable
You are using a bool variable as a function, according to the docs is_authenticated is an attribute.
To fix it just write:
if request.user.is_authenticated:
- [Django]-Product variants not reflecting updated quantity in Order Summary in a Django E-commerce Project
- [Django]-Automatically import all db tables in manage.py shell
- [Django]-Filter for elements using exists through a reverse foreign key relationship
Source:stackexchange.com