Re: order_insertion_by

46 views
Skip to first unread message

floriane brin

unread,
Jul 2, 2013, 3:52:06 PM7/2/13
to django-...@googlegroups.com
Did you found a solution ?
Thanks

On Thursday, June 28, 2012 3:53:22 AM UTC-7, evodv5 wrote:
Hi!

I set order_insertion_by = ['priority']

So, if I have nodes:
A [priority = 2]
B [priority = 0]
C [priority = 4]

order is: B, A, C

But I want this in descending order (C,A,B) - what I have to do?


Ali Oğuzhan Yıldız

unread,
Nov 4, 2013, 7:50:14 PM11/4/13
to django-...@googlegroups.com


On Thursday, June 28, 2012 1:53:22 PM UTC+3, evodv5 wrote:
Hi!

I set order_insertion_by = ['priority']

So, if I have nodes:
A [priority = 2]
B [priority = 0]
C [priority = 4]

order is: B, A, C

But I want this in descending order (C,A,B) - what I have to do?

order_insertation_by = ["-priority"]

add a "-" before the field name.
Reply all
Reply to author
Forward
0 new messages