Opened 8 years ago
Last modified 13 months ago
#27229 assigned New feature
Allow using aggregates in ModelAdmin.list_display
Reported by: | Dor | Owned by: | Dor |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Olivier Dalang | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
The change list page in the administration panel should be able to display aggregate results.
For example - a sum of one of the columns that is displayed in the last row of the table.
See attached screenshot for another example.
Attachments (1)
Change History (7)
by , 8 years ago
Attachment: | django-admin.png added |
---|
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
I guess this is the same or similar idea as #14336? It helps if you can explain a bit about what the implementation looks like. I guess you know it's already possible to some extent .
comment:3 by , 8 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
Summary: | Add aggregates to change list → Allow using aggregates in ModelAdmin.list_display |
Triage Stage: | Unreviewed → Accepted |
The PR looks interesting, but I'd like to see a proposal that also accommodates annotations (if even not implemented right now, it would be nice to figure out the design first). I don't know if it might be worth trying to be able to use expressions and aggregates directly in list_display
. In any case, I'd like to see a discussion on the DevelopersMailingList to get a consensus on the design.
comment:5 by , 8 years ago
Can't get enough traction in the mailing list: https://groups.google.com/forum/#!topic/django-developers/T1-80RV8b5g
Tim, perhaps you could help by chiming in?
comment:6 by , 13 months ago
Cc: | added |
---|
Screenshot with aggregate cells