@Alex:
Nope, that's only pulling back entry's that have approved comments.
On Jan 20, 12:43 pm, "alex.gay...@gmail.com"
wrote:
> On Jan 20, 11:53 am, tlow wrote:
>
>
>
> > I think you can not do that with only one query using annotate.
>
> > You could do it manually in python using the code ab
I'm currently using the extra method (subquery) and it's working
perfectly.
Thanks for clearing that up for me Thomas.
On Jan 20, 11:53 am, tlow wrote:
> I think you can not do that with only one query using annotate.
>
> You could do it manually in python using the code above including the
> a
On Jan 20, 11:53 am, tlow wrote:
> I think you can not do that with only one query using annotate.
>
> You could do it manually in python using the code above including the
> additional filter on comment_approved and merge all (entry, number)
> pairs with Entry.objects.all() using 0 for entries w
I think you can not do that with only one query using annotate.
You could do it manually in python using the code above including the
additional filter on comment_approved and merge all (entry, number)
pairs with Entry.objects.all() using 0 for entries which are not
listed in your first query. Si
Here are my models:
class Entry(models.Model):
name = models.CharField(max_length=200, unique=True)
date_published = models.DateTimeField()
is_published = models.BooleanField(default=False)
class Comment(models.Model):
entry = models.ForeignKey('Entry')
na
5 matches
Mail list logo