get_latest_by should support multiple columns via tuple like ordering
The ordering attribute of the Meta class is a tuple so that the default ordering can use multiple columns. It would be nice if get_latest_by was the same way. However, it currently must be a string specifying a single column.
This is especially important when specifying both, since you would typically want the latest item to correspond with the last item in a list ordered according to ordering.
Change History
(14)
Component: |
Uncategorized → Database layer (models, ORM)
|
Has patch: |
set
|
Keywords: |
get_latest_by ordering added
|
Triage Stage: |
Unreviewed → Accepted
|
Severity: |
→ Normal
|
Type: |
→ New feature
|
Easy pickings: |
unset
|
Patch needs improvement: |
set
|
Triage Stage: |
Accepted → Design decision needed
|
Triage Stage: |
Design decision needed → Accepted
|
Owner: |
changed from nobody to François Freitag
|
Patch needs improvement: |
unset
|
Status: |
new → assigned
|
Version: |
1.0 → master
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Patch implementing requested feature.