Hello,
I have the following models
class Book(models.Model):
author = models.ManyToManyField(Author)
pub_date = models.DateTimeField()
...
class Author(models.Model):
tag = models.ManyToManyField(Tag)
class Tag(models.Model):
name = models.CharField(max_length=20)
What I want to query for is:
The most used Tags (and their count) for all books who's pub_date is greater
then today.
I can solve the last part
Book.objects.filter(pub_date__gt=datetime.date.today())
But how do I count all the tags for all these books ?
Jonas Geiregat
[email protected]
--
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.