Reputation: 7841
I have the following model
class Entry(models.Model):
user = models.ForeignKey(User)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(default=timezone.now)
tags = TaggableManager()
I'm trying t get all the tags for a user and the following query isn't working as expected
tags = Tag.objects.filter(entry__user=u)
This is using django-taggit
https://github.com/alex/django-taggit
Upvotes: 4
Views: 250
Reputation: 7841
Looks like
tags = Tag.objects.filter(entry__user=u)
worked.. I must have had some bad code somewhere.
Upvotes: 1