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

authentication - Mongodb revoke acccess to connect test database -

c - getting error: cannot take the address of an rvalue of type 'int' -

python - GitPython: check if git is available -