[Fixed]-Django: If equals count


This is not the way to think about things. You can’t ask for the number of things in a completely separate view. Instead, you need to calculate them in the view you are currently using.

You can use aggregation to count the number of items in each state:


Leave a comment