I'm able to get an intermediate m2m model to show data, but not with the template-friendly "_set" syntax:
category = models.Category.objects.select_related().get(pk=pk) entries = category.entry.order_by('-temp_sort_order').filter(temp_sort_order__gte=0) for entry in entries: assert isinstance(entry, models.Entry) ce = models.CategoryEntry2.objects.get(entry=entry, category=category) pprint('1: ' + ce.wiki + str(entry.ce)) foo = entry.ce_set.get(category=category) #'Entry' object has no attribute 'ce_set' pprint('2: ' + foo.wiki + str(foo.ce)) #'Entry' object has no attribute 'ce_set' for entry in category.ce_set.all: #'Category' object has no attribute 'ce_set' pprint('1: ' + entry.wiki) Any ideas? class Category(models.Model): title = models.CharField(max_length=1024,null=True,blank=True) entry = models.ManyToManyField(Entry,null=True,blank=True, related_name='ce', through='CategoryEntry2', ) -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/kYgWEzIQjrgJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.