podcasts.html 1.16 KB
Newer Older
fred's avatar
fred committed
1
{% load paniktags %}{% load soundfiles %}<?xml version="1.0" encoding="UTF-8"?>
fred's avatar
fred committed
2
3
4
5
6
7
8
9
<rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<channel>
    <title>Radio Panik{% if title %} - {{ title }}{% endif %}</title>
    <link>{{ base_url }}</link>
    <description></description>
fred's avatar
fred committed
10
    <lastBuildDate>{{ soundfiles.0.creation_timestamp|rfc822 }}</lastBuildDate>
fred's avatar
fred committed
11
12
13
14
15
16

    {% for soundfile in soundfiles|slice:":20" %}<item>
        <title>{% if soundfile.fragment %}{{ soundfile.title }} - {% endif %}{{ soundfile.episode.title }}</title>
        <link>{{ base_url }}{% url 'episode-view' slug=soundfile.episode.slug emission_slug=soundfile.episode.emission.slug %}</link>
        <description>{{ soundfile.episode.text|striptags }}</description>
        <enclosure url="{{ base_url }}{{ soundfile|format_url:'mp3' }}" type="audio/mpeg"/>
fred's avatar
fred committed
17
18
        <guid>{{ base_url }}{{ soundfile.episode.get_absolute_url }}#{{ soundfile.id }}</guid>
        <pubDate>{{ soundfile.episode.creation_timestamp|rfc822 }} GMT</pubDate>
fred's avatar
fred committed
19
20
21
22
    </item>
    {% endfor %}
</channel>
</rss>