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

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -