Hello,
I have the following code 's2 = s.sandp.all()' When I do a 'assert
False, s2' I get the following:
[<Choice: (<Size: 4' x 5'9>, <Price: 169.49>)>, <Choice: (<Size: 5'3 x
7'6>, <Price: 299.99>)>, <Choice: (<Size: 7'9 x 11'>, <Price:
449.99>)>, <Choice: (<Size: 2' x 3'>, <Price: 59.99>)>]
I want to be able to sort the list by the Price.
///////////
I tried the following code
s2 = s.sandp.order_by('price')
assert False, s2
And this is what I get:
[<Choice: (<Size: 4' x 5'9>, <Price: 169.49>)>, <Choice: (<Size: 5'3 x
7'6>, <Price: 299.99>)>, <Choice: (<Size: 7'9 x 11'>, <Price:
449.99>)>, <Choice: (<Size: 2' x 3'>, <Price: 59.99>)>]
Notice the last element has a price of 59.99. Is there anyway that I
can sort the list so that it's ordered by price?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---