Django admin interface to display aggregates -
i want use django admin interface display aggregates of data in model. ex: model has following fields [employee name, salary, month] want aggregate table fields [month, total_salary_paid, cumulative_of_month_salaries_paid]. how do ?? have searched internet didn't find way it..any reference or guidance help here's snippet recent project of mine. adds column in admin "are there entries in m2m related table?" , "what's count of entries in m2m related table?". similar things other aggregate functions django offers. from django.db.models import count django.contrib import admin class expertmodeladmin(admin.modeladmin): def num_companies(self, obj): """# of companies expert has.""" return obj.num_companies num_companies.short_description = "# companies" def has_video(self, obj): """does expert have video?""" return bool(obj.has_v...