Hey Eric,

I've done this with two different models, the main trick was in the  
Feed class's items() method. What I'm doing is a little ugly: calling  
list() on the two querysets, appending one list to the other, then  
sorting the result using a function that determines which date  
attribute to use for each model instance. The same function is then  
used in item_pubdate() to return the proper date attribute. You can't  
dynamically determine the template to use in the class definition, so  
differentiating between the two models happens in the template code  
itself.

There have been some nice extensions to the syndication framework in  
trunk, which might make some of this cleaner, but I haven't looked at  
it closely in a while.

Hope that helps,
Eric

On Aug 23, 2008, at 1:41 AM, Eric Montgomery wrote:

>
> Bumping this back up.
>
> Does anyone even know an easy way to create a feed which has items of
> different models (e.g. blog entries and podcast episodes in the same
> feed)?  I'm not sure how to even do it by hand, much less by combining
> existing feeds.
>
> Thanks
>
> On Aug 20, 11:05 am, Eric Montgomery <[EMAIL PROTECTED]> wrote:
>> I have a couple offeedsset up, one for a blog and one for a
>> podcast.  I want to create a combined feed that contains both of them
>> without having to create the combined feed from scratch.  Is there
>> some way to combine two (or more) feed classes into one?
> >


--~--~---------~--~----~------------~-------~--~----~
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