How to use the feedgenerator.django.utils.feedgenerator.rfc2822_date function in feedgenerator

To help you get started, we’ve selected a few feedgenerator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hackncast / hackncast / .plugins / pelican-podcast-feed / pelican_podcast_feed.py View on Github external
#  ex: In this episode... 
        if hasattr(item, 'description'):
            items['itunes:summary'] = item.description
        else:
            items['itunes:summary'] = Markup(item.summary).striptags()

        items['description'] = "".format(
            '<img alt="{}" title="{}" src="{}">'.format(item.image_wide, item.title, item.title)
            )
        items['description'] += "".format(
            unicode(Markup(item.summary)).replace("", "").replace("", "")
            )

        # Date the article was last modified.
        #  ex: Fri, 13 Jun 2014 04:59:00 -0300
        items['pubDate'] = rfc2822_date(
            set_date_tzinfo(
                item.modified if hasattr(item, 'modified') else item.date,
                self.settings.get('TIMEZONE', None))
            )

        # Name(s) for the article's author(s).
        #  ex: John Doe
        if hasattr(item, 'author'):
            items['itunes:author'] = item.author.name

        # Subtitle for the article.
        #  ex: My episode subtitle
        if hasattr(item, 'subtitle'):
            items['itunes:subtitle'] = Markup(item.subtitle).striptags()

        # Ex:
github magnunleno / pelican-podcast-feed / pelican_podcast_feed.py View on Github external
# Summary for the article. This can be obtained either from
        # a ``:description:`` or a ``:summary:`` directive.
        #  ex: In this episode... 
        if hasattr(item, 'description'):
            items['itunes:summary'] = item.description
        else:
            items['itunes:summary'] = Markup(item.summary).striptags()

        items['description'] = "".format(
            Markup(item.summary)
            )

        # Date the article was last modified.
        #  ex: Fri, 13 Jun 2014 04:59:00 -0300
        items['pubDate'] = rfc2822_date(
            set_date_tzinfo(
                item.modified if hasattr(item, 'modified') else item.date,
                self.settings.get('TIMEZONE', None))
            )

        # Name(s) for the article's author(s).
        #  ex: John Doe
        if hasattr(item, 'author'):
            items['itunes:author'] = item.author.name

        # Subtitle for the article.
        #  ex: My episode subtitle
        if hasattr(item, 'subtitle'):
            items['itunes:subtitle'] = Markup(item.subtitle).striptags()

        # Ex: