Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Daron
panikweb
Commits
e2c85d94
Commit
e2c85d94
authored
May 24, 2017
by
fred
Browse files
add logo to podcast feed
parent
97f780e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
e2c85d94
...
...
@@ -657,6 +657,13 @@ class NewsItemDetailView(DetailView):
newsitem
=
NewsItemDetailView
.
as_view
()
class
RssCustomPodcastsFeed
(
Rss201rev2Feed
):
def
add_root_elements
(
self
,
handler
):
super
(
RssCustomPodcastsFeed
,
self
).
add_root_elements
(
handler
)
handler
.
startElement
(
'image'
,
{})
handler
.
addQuickElement
(
'title'
,
'Radio Panik'
)
handler
.
addQuickElement
(
'url'
,
self
.
feed
[
'link'
]
+
'static/img/Radio_Panik_Logo_2016-01.png'
)
handler
.
endElement
(
'image'
)
def
root_attributes
(
self
):
attrs
=
super
(
RssCustomPodcastsFeed
,
self
).
root_attributes
()
attrs
[
'xmlns:dc'
]
=
'http://purl.org/dc/elements/1.1/'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment