]> git.deb.at Git - deb/hackedgotchi.git/commitdiff
Add atom django template
authorjoerg <joerg@c2f067bf-98e0-425f-9c98-e76020cfa380>
Sat, 20 Dec 2008 22:24:36 +0000 (22:24 +0000)
committerjoerg <joerg@c2f067bf-98e0-425f-9c98-e76020cfa380>
Sat, 20 Dec 2008 22:24:36 +0000 (22:24 +0000)
git-svn-id: svn+ssh://svn.debian.org/svn/planet-debian/trunk@1058 c2f067bf-98e0-425f-9c98-e76020cfa380

config/config.ini
config/config.ini.tmpl
templates/atom.xml.dj [new file with mode: 0644]
templates/index.html.dj

index afd012609f0c875e3c91a943850d270a9084b92d..af91b36b3259cdb9061ca6f998eac2d1c79fdef8 100644 (file)
@@ -43,7 +43,7 @@ log_level = DEBUG
 spider_threads = 15
 
 # template_files: Space-separated list of output template files
-template_files = templates/index.html.dj templates/atom.xml.tmpl templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl
+template_files = templates/index.html.dj templates/atom.xml.dj templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl
 
 # The following provide defaults for each template:
 # items_per_page: How many items to put on each page
index b5238b0627ae7e926fa4a185928fd5393c94253e..54d836d7c381116405e1d0416f89f02782a7ad45 100644 (file)
@@ -77,7 +77,7 @@ log_level = DEBUG
 spider_threads = 15
 
 # template_files: Space-separated list of output template files
-template_files = templates/index.html.dj templates/atom.xml.tmpl templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl
+template_files = templates/index.html.dj templates/atom.xml.dj templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl
 
 # The following provide defaults for each template:
 # items_per_page: How many items to put on each page
diff --git a/templates/atom.xml.dj b/templates/atom.xml.dj
new file mode 100644 (file)
index 0000000..3aaa064
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+
+  <title>{{ name }}</title>
+  <link rel="self" href="{{ feed }}"/>
+  <link href="{{ link }}"/>
+  <id>{{ feed }}</id>
+  <updated>{{ date_iso }}</updated>
+  <generator uri="{{ generator }}">{{ generator }}</generator>
+
+{% for item in Items %}
+  <entry xml:lang="{% firstof item.channel_language "en" %}">
+       <title type="html" xml:lang="{% firstof item.title_language "en" %}">{{ item.title }}</title>
+       <link href="{{ item.link }}"/>
+       <id>{{ item.id }}</id>
+       <updated>{{ item.date_iso }}</updated>
+       <summary type="html" xml:lang="{% firstof item.summary_language "en" %}">{{ item.summary }}</summary>
+       <content type="html" xml:lang="{% firstof item.content_language "en" %}">{{ item.content }}</content>
+       <author>
+         <name>{% firstof item.author_name item.channel_author_name item.channel_name %}</name>
+         {% if item.author_email or item.channel_author_email %} <email>{% firstof item.author_email item.channel_author_email %}</email> {% else %} <uri>{{ item.channel_link }}</uri> {% endif %}
+       </author>
+       <source>
+         <title type="html">{% firstof item.channel_title item.channel_name %}</title>
+         {% if item.channel_subtitle %}<subtitle type="html">{{ item.channel_subtitle }}</subtitle>{% endif %}
+         <link rel="self" href="{{ item.channel_url }}"/>
+         <id>{% firstof item.channel_id item.channel_url %}</id> {% if item.channel_updated_iso %}<updated>{{ item.channel_updated_iso }}</updated>{% endif %} {% if item.channel_rights %}<rights type="html">{{ item.channel_rights }}</rights>{% endif %}
+       </source>
+  </entry>
+  {% endfor %}
+</feed>
index 951e0bbb6b0cf1f7d561f40c47f3553d560b2508..14ec4ab243204a6a65a440a0dce9b98c3c741be0 100644 (file)
@@ -89,7 +89,7 @@
          </p>
 
          <p>
-               {{ Config.lastupdatetext }} {{ date }}<br>{{ Config.utctext }}<br>
+               {{ Config.lastupdatetext }} {{ date|date:"d M Y H:i" }}<br>{{ Config.utctext }}<br>
                {{ Config.contacttext }} <a href="mailto:{{ owner_email }}">{{ owner_name }}</a>
          </p>