Opened 9 years ago
Last modified 9 years ago
#25676 closed Uncategorized
Queryset.extra planned deprecation - Sorting a calculated field — at Initial Version
Reported by: | YJD | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.7 |
Severity: | Normal | Keywords: | Queryset.extra |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
After reading that Queryset.extra will be deprecated in the future, I was unable to find alternative methods to sorting on a calculated field. All I'm doing is a simple profit margin calculation, i.e. net income / net sales, and wish to be able to sort that field in a queryset that may or may not be sliced/filtered.
Note:
See TracTickets
for help on using tickets.