Changeset - c6e531a01ff8
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 1 month ago 2024-04-26 06:33:55
ben@sturm.com.au
podjango: Use feed title from database
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
conservancy/podjango/feeds.py
Show inline comments
...
 
@@ -65,13 +65,13 @@ def for_podcast_feed_extra_kwargs(self, obj):
 
                     'width': '300', 'height': '300'},
 
        'webMaster': 'oggcast@faif.us (Bradley and Karen)',
 
        'dcCreator': 'oggcast@faif.us (Bradley and Karen)',
 
        'iTunesExplicit': 'No',
 
        'iTunesBlock': 'No',
 
        'iTunesImage': {'url': add_domain(self.current_site.domain, obj.icon.url, self.is_secure),
 
                        'title': 'The Corresponding Source (formerly Free as in Freedom)',
 
                        'title': obj.title,
 
                        'link': self.author_link,
 
                        'type': 'video/jpg'},
 
        'category': {'name': 'Government & Organizations', 'scheme': 'http://www.itunes.com/dtds/podcast-1.0.dtd',
 
                     'subcats': ['Non-Profit']},
 
        'keywords': 'open source, opensource, freesoftware, software freedom, legal, law, linux, free, license, gpl, lgpl, agpl, bsd',
 
        'iTunesAuthor': 'Software Freedom Conservancy',
...
 
@@ -183,13 +183,12 @@ class iTunesFeedType(Rss201rev2Feed):
 
        super().add_item_elements(handler, item)
 
        podcast_helper_add_item_elements(self, handler, item)
 

	
 

	
 
class CastFeed(CastFeedBase):
 
    feed_type = iTunesFeedType
 
    title = "The Corresponding Source (formerly Free as in Freedom)"
 
    link = "/cast/"
 
    description = "A bi-weekly discussion of legal, policy, and other issues in the open source and software freedom community (including occasional interviews) from Brooklyn, New York, USA.  Presented by Karen Sandler and Bradley M. Kuhn."
 
    author_email = "podcast@faif.us"
 
    author_link = "https://sfconservancy.org/"
 
    author_name = "Software Freedom Conservancy"
 
    title_template = "feed_title.html"
...
 
@@ -203,12 +202,13 @@ class CastFeed(CastFeedBase):
 
        self.current_site = get_current_site(request)
 
        self.is_secure = request.is_secure()
 
        return super().get_feed(obj, request)
 

	
 
    def get_object(self, request, podcast_slug):
 
        self.podcast = Podcast.objects.get(slug=podcast_slug)
 
        self.title = self.podcast.title
 
        return self.podcast
 

	
 
    def items(self, obj):
 
        return Cast.objects.filter(podcast=obj, pub_date__lte=datetime.now()).order_by('-pub_date')
 

	
 
    def item_pubdate(self, item):
0 comments (0 inline, 0 general)