I'm using the syndication framework to generate feeds for my blogging
app, and everything is working fine so far.  I have multiple blogs
each with their own feeds, but I would like to add a combined feed.
The documentation seems to mention that this is possible, but it
doesn't provide an example and I'm not sure what's the best way to
implement it.
Here is the documentation code, which I pretty much directly copied:

class BeatFeed(Feed):
    def get_object(self, bits):
        # In case of "/rss/beats/0613/foo/bar/baz/", or other such
clutter,
        # check that bits has only one member.
        if len(bits) != 1:
            raise ObjectDoesNotExist
        return Beat.objects.get(beat__exact=bits[0])

In this case, if len(bits) is not 1, then ObjectDoesNotExist is raised
(this would correspond to the url "domain.com/rss/beats/").
I would like to generate a combined feed from all of my blogs, but the
only way I can seem to do this is to have get_object() return None,
and then check if obj is None in each of my title(), description(),
link() and items() methods in order to handle the special case.  It
seems to work, but doesn't feel ideal.  If anyone knows a better way
to do this, I'd love to know it.

Thanks,
Eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to