I'm trying to build a combined feed, and not having much luck. Here's
what I have:

class CombinedFeed(Feed):
    title = site.name +" combined feed"
    link = "/"
    description = "Latest updates from all "+site.name +" feeds"
    description_template = 'feeds/combined.html'

    def items(self):
        combined = []
        articles        =       Article.objects.all().order_by('-created')[:
40]
        events          =       
Event.objects.filter(start_date__gte=now).order_by
('start_date')[:50]
        news            =       
News_item.objects.filter(pub_date__lte=now).order_by('-
pub_date')[:20]
        combined        =       itertools.chain(news, articles, projects, 
issues,
events)
        for item in combined:
           try:
              item.date = item.created
           except:
              try:
                item.date = item.topic_modification_date
              except:
                 try:
                    item.date = item.pub_date
                 except:
                    try:
                       item.date = item.start_date
                    except:
                       item.date = now
        return combined


Which doesn't appear to do anything. No error, but no ojb in
combined.html, either.
Suggestions?
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to