item_categories hooks in high-level syndication framework

2 views
Skip to first unread message

Flavio Curella

unread,
Dec 14, 2005, 2:01:13 PM12/14/05
to Django users
I think class django.contrib.syndication.feeds.Feed need
item_categories methods that allow use of categories also in high-level
syndication framework.
Something like this should work:

# ITEM CATEGORIES --One of the following three is optional. The
# framework looks for them in this order.
#
# If you specify this, you must specify item_categories.

def item_categories(self, obj):
"""
Takes an item, as returned by items(), and returns the item's
categories as a Python list.
"""

def item_categories(self):
"""
Returns the categories for every item in the feed.
"""

item_categories = ("Action", "Drama", "Sci-Fi",) # Hard-coded
categories.


Cherrs,
Flavio Curella.

James Bennett

unread,
Dec 14, 2005, 2:09:22 PM12/14/05
to django...@googlegroups.com
On 12/14/05, Flavio Curella <flavio....@gmail.com> wrote:
> I think class django.contrib.syndication.feeds.Feed need
> item_categories methods that allow use of categories also in high-level
> syndication framework.

A few days back, I posted a slightly different suggestion as a ticket:

http://code.djangoproject.com/ticket/1028

--
"May the forces of evil become confused on the way to your house."
-- George Carlin

Reply all
Reply to author
Forward
0 new messages