podjango: Remove unused code and templates
This commit is contained in:
parent
d1960cf04c
commit
bf64250aa3
3 changed files with 0 additions and 49 deletions
|
@ -151,34 +151,6 @@ def podcast_helper_add_item_elements(self, handler, item):
|
||||||
'fileSize' : item['enclosure'].length,
|
'fileSize' : item['enclosure'].length,
|
||||||
'type' : item['enclosure'].mime_type})
|
'type' : item['enclosure'].mime_type})
|
||||||
|
|
||||||
class OmnibusFeedType(Rss201rev2Feed):
|
|
||||||
def root_attributes(self):
|
|
||||||
attrs = super().root_attributes()
|
|
||||||
attrs['xmlns:itunes'] = 'http://www.itunes.com/dtds/podcast-1.0.dtd'
|
|
||||||
attrs['xmlns:atom'] = 'http://www.w3.org/2005/Atom'
|
|
||||||
attrs['xmlns:media'] = 'http://search.yahoo.com/mrss/'
|
|
||||||
# attrs['xmlns:dc'] = "http://purl.org/dc/elements/1.1/"
|
|
||||||
return attrs
|
|
||||||
|
|
||||||
def add_root_elements(self, handler):
|
|
||||||
super().add_root_elements(handler)
|
|
||||||
podcast_helper_add_root_elements(self, handler)
|
|
||||||
|
|
||||||
def add_item_elements(self, handler, item):
|
|
||||||
super().add_item_elements(handler, item)
|
|
||||||
|
|
||||||
# The below is a bit of a cheat, I assume anything in the ominbus
|
|
||||||
# feed that has an enclosure must be a podcast. Probably not true
|
|
||||||
# as such in the general case, but enough for this case, I think.
|
|
||||||
if item['enclosure']:
|
|
||||||
podcast_helper_add_item_elements(self, handler, item)
|
|
||||||
else:
|
|
||||||
# Block things that don't have an enclosure from iTunes in
|
|
||||||
# case someone uploads this feed there.
|
|
||||||
handler.addQuickElement("itunes:block", 'Yes')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# http://www.feedforall.com/itune-tutorial-tags.htm
|
# http://www.feedforall.com/itune-tutorial-tags.htm
|
||||||
# http://www.feedforall.com/mediarss.htm
|
# http://www.feedforall.com/mediarss.htm
|
||||||
class iTunesFeedType(Rss201rev2Feed):
|
class iTunesFeedType(Rss201rev2Feed):
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
<!-- FIXME: SFLC specific content -->
|
|
||||||
<!-- Copyright (C) 2008 Bradley M. Kuhn <bkuhn@ebb.org> -->
|
|
||||||
<!-- Permission is granted to copy, modify, redistribute, propagate,
|
|
||||||
-- and/or convey this template in any form. -->
|
|
||||||
|
|
||||||
|
|
||||||
{% ifequal obj.omnibus_type "news" %}
|
|
||||||
<p><i>A news item from SFLC.</i></p>
|
|
||||||
{% endifequal %}
|
|
||||||
{% ifequal obj.omnibus_type "podcast" %}
|
|
||||||
<p><i>An episode of the <a href="http://{{ site }}/podcast/">Software Freedom Law Show</a>.</i></p>
|
|
||||||
{% endifequal %}
|
|
||||||
{% ifequal obj.omnibus_type "event" %}
|
|
||||||
<p><i>An <a href="http://{{ site }}/events/">upcoming event</a> related to the SFLC .</i></p>
|
|
||||||
{% endifequal %}
|
|
||||||
{% include obj.omnibus_feed_description_template %}
|
|
|
@ -1,5 +0,0 @@
|
||||||
<!-- Copyright (C) 2008 Bradley M. Kuhn <bkuhn@ebb.org> -->
|
|
||||||
<!-- Permission is granted to copy, modify, redistribute, propagate,
|
|
||||||
-- and/or convey this template in any form. -->
|
|
||||||
|
|
||||||
{% include obj.omnibus_feed_title_template %}
|
|
Loading…
Reference in a new issue