Re: Having issues displaying related items from db on templates

2008-03-10 Thread [EMAIL PROTECTED]
I tried to add a method to the Category class like this: def get_feed_items(self): """ Returns the feed items for feeds in a category. """ return FeedItems.objects.filter(feed__category=self) But I get a Name Error because F

Having issues displaying related items from db on templates

2008-03-10 Thread [EMAIL PROTECTED]
I'm putting together a basic feed aggregator with the following classes in my app's model: category, feed and feeditem. Each feed is tied to a category (ForeignKey), and each feeditem is tied to a Feed (ForeignKey). Here is my model: from django.db import models class Category(model