class News(models.Model):
title = models.CharField(max_length=128)
author = models.ForeignKey(User, related_name='news')
class Report(News):
subtitle = models.CharField(max_length=128)
synopsis = models.TextField()
class Post(News):
body = models.TextField()
I have a page where I list authors, and would like to include a count
of Reports and Posts from each one. Is there a way to filter News for
Report or Post items? I would like to add to the NewsManager so that
the template could include something as simple as
{{ author.news.report_count }}.