1👍
When filtering the Product
model by category, you should use the category instance, not the category name.
products_by_category = Product.objects.filter(category=current_category)
Note you don’t need to call all()
before filter()
.
- Data is sent to the form python script, get a code 200, but dont take a letter (result of work view)
Source:stackexchange.com