Now all the lead count in category list are updated properly. I'm not sure if it's the best practice, since I didn't save the update number on the database.
Adding Number field to the category model.
Passing the data that we extracted from the "Leads: Views" to the "Category_list" template.
The "leads/views.py" is able to obtain the number of leads that belong to a specific category and pushing through the "context" to the "category_list" template.
Now all the lead count in category list are updated properly. I'm not sure if it's the best practice, since I didn't save the update number on the database.
Adding Number field to the category model.
Passing the data that we extracted from the "Leads: Views" to the "Category_list" template.
The "leads/views.py" is able to obtain the number of leads that belong to a specific category and pushing through the "context" to the "category_list" template.