Thanks for the advice Tim. I ended up doing something similar,
although not as elegant as your solution. I'll give it a go ;)
cheers
adrian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
adrian wrote:
> Was wondering if anyone can point me in the right direction here, what
> would be the Django style way to annotate a set with a row number in
> some way like:-
>
> Book.objects.all().order_by('date_added').annotate(row_num=RowNumber
> ('id'))
Well many times the "Django style way
Was wondering if anyone can point me in the right direction here, what
would be the Django style way to annotate a set with a row number in
some way like:-
Book.objects.all().order_by('date_added').annotate(row_num=RowNumber
('id'))
Unfortunately PostgreSQL does not support ROW_NUMBER yet so I c
3 matches
Mail list logo