Skip to content
Advertisement

Django-filter: count data

Does anybody knows how can I use count based on selected value using django_filters

Error

JavaScript

My Reference link

views.py

JavaScript

filters.py

JavaScript

user_list.html

JavaScript

I want to count all the list base from data I filtered

enter image description here

Advertisement

Answer

You’ll want the count of the resulting queryset, which you can get from the filter’s qs property (as you do in your template!).

Change

JavaScript

to

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement