I have the following models:
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 }}.
--
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.