Ticket #9800: rss-add-isPermaLink-element.diff

File rss-add-isPermaLink-element.diff, 709 bytes (added by akoha, 6 years ago)

Here's the patch.

  • django/utils/feedgenerator.py

    diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py
    a b  
    242242        if item['comments'] is not None:
    243243            handler.addQuickElement(u"comments", item['comments'])
    244244        if item['unique_id'] is not None:
    245             handler.addQuickElement(u"guid", item['unique_id'])
     245            if item['link'] is not None:
     246                handler.addQuickElement(u"guid", item['unique_id'], {u"isPermaLink": "false"})
     247            else:
     248                handler.addQuickElement(u"guid", item['unique_id'])
    246249        if item['ttl'] is not None:
    247250            handler.addQuickElement(u"ttl", item['ttl'])
    248251
Back to Top