views:

16

answers:

0

I have BlogEntry model, which has two special fields : "publication_date"(timestamp), "sticky"(boolean).

i need to get them in order by "publication_date", and group by "sticky" field that have to be first in query set.

what i try to get:
[
<BlogEntry:"05.03.2010 sticky:1">,
<BlogEntry:"04.03.2010 sticky:1">,
<BlogEntry:"03.03.2010 sticky:1">,
<BlogEntry:"02.03.2010 sticky:1">
<BlogEntry:"08.03.2010 sticky:0">,
<BlogEntry:"07.03.2010 sticky:0">,
<BlogEntry:"06.03.2010 sticky:0">,
<BlogEntry:"01.03.2010 sticky:0">
]
]