Wooops
I just realised my template var had a typo so it wasn't getting
anything.
Sorry.
Nice tip for checking the sql though. It has been noted.
a note to others:
i was getting nothing to start with until i remembered that querysets
are lazy.
you might need to force evaluation to get your sql
Wooops
I just realised my template var had a typo so it wasn't getting
anything.
Sorry.
Nice tip for checking the sql though. It has been noted.
a note to others:
i was getting nothing to start with until i remembered that querysets
are lazy.
you might need to force evaluation to get your sql
On Sat, 2008-03-01 at 15:25 -0800, itpaul wrote:
> I got this from the docs and it gives an extra comment_count column.
> great.
>
> discussion.objects.extra(select={'comment_count': 'SELECT COUNT(*)
> FROM forum_commentextra WHERE forum_commentextra.discussion_id =
> forum_discussion.id'},)
>
3 matches
Mail list logo