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
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
2 matches
Mail list logo