python - Django Sorting by multiple fields without respect to object -


so have model has generic foreign key 3 other models lets call them a, b, c.

i want have them ordered date.currently method sorting using like

statuses = statuses.order_by('a__datetime', 'b__datetime', 'c__datetime')

however sorts datetimes a, datetimes b, c. overall not in order chunks are.

is there anyway have them sorted date?

thanks in advance.


Comments