Ticket #3624: feeds.diff

File feeds.diff, 1.1 KB (added by Rob Hudson <treborhudson@…>, 17 years ago)

Patch against trunk. I can add docs if this looks good.

  • django/contrib/syndication/feeds.py

     
    8585        try:
    8686            title_tmp = loader.get_template(self.title_template_name)
    8787        except TemplateDoesNotExist:
    88             title_tmp = Template('{{ obj }}')
     88            title_tmp = self.__get_dynamic_attr('item_title', obj)
     89            if not title_tmp:
     90                title_tmp = Template('{{ obj }}')
    8991        try:
    9092            description_tmp = loader.get_template(self.description_template_name)
    9193        except TemplateDoesNotExist:
    92             description_tmp = Template('{{ obj }}')
     94            description_tmp = self.__get_dynamic_attr('item_description', obj)
     95            if not description_tmp:
     96                description_tmp = Template('{{ obj }}')
    9397
    9498        for item in self.__get_dynamic_attr('items', obj):
    9599            link = add_domain(current_site.domain, self.__get_dynamic_attr('item_link', item))
Back to Top