(self)
Returns the currently advertised podcast
Returns the currently advertised podcast
Returns the currently advertised podcast
def get_advertised_podcast(self):
        """Returns the currently advertised podcast"""
        if settings.PODCAST_AD_ID:
            podcast = cache.get("podcast_ad")
            if podcast:
                return podcast

            pk = uuid.UUID(settings.PODCAST_AD_ID)
            podcast = self.get_queryset().get(pk=pk)
            cache.set("pocdast_ad", podcast)
            return podcast
def get_advertised_podcast ( self ) : if settings . PODCAST_AD_ID : podcast = cache . get ( "podcast_ad" ) if podcast : return podcast pk = uuid . UUID ( settings . PODCAST_AD_ID ) podcast = self . get_queryset ( ) . get ( pk = pk ) cache . set ( "pocdast_ad" , podcast ) return podcast