summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-10-19 18:30:32 -0500
committerDan McGee <dan@archlinux.org>2014-10-19 18:30:32 -0500
commitf7d1940a731370ceee6e1c6eaae2cc2f5bab0432 (patch)
treec0a95738e7db86b517d111e055959a36324452d7
parent7c46d07f6417382e560d32c361c94dd8f2b9ddb8 (diff)
Remove usage of templates for RSS feeds
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--feeds.py8
-rw-r--r--templates/feeds/news_description.html2
-rw-r--r--templates/feeds/packages_title.html1
3 files changed, 6 insertions, 5 deletions
diff --git a/feeds.py b/feeds.py
index d1836178..0bbac270 100644
--- a/feeds.py
+++ b/feeds.py
@@ -79,7 +79,6 @@ class PackageFeed(Feed):
feed_type = GuidNotPermalinkFeed
link = '/packages/'
- title_template = 'feeds/packages_title.html'
def __call__(self, request, *args, **kwargs):
wrapper = condition(etag_func=package_etag, last_modified_func=package_last_modified)
@@ -142,6 +141,9 @@ class PackageFeed(Feed):
def item_pubdate(self, item):
return item.last_update
+ def item_title(self, item):
+ return '%s %s %s' % (item.pkgname, item.full_version, item.arch.name)
+
def item_description(self, item):
return item.pkgdesc
@@ -168,7 +170,6 @@ class NewsFeed(Feed):
link = '/news/'
description = 'The latest and greatest news from the Arch Linux distribution.'
subtitle = description
- description_template = 'feeds/news_description.html'
def __call__(self, request, *args, **kwargs):
wrapper = condition(etag_func=news_etag, last_modified_func=news_last_modified)
@@ -192,6 +193,9 @@ class NewsFeed(Feed):
def item_title(self, item):
return item.title
+ def item_description(self, item):
+ return item.html()
+
class ReleaseFeed(Feed):
feed_type = GuidNotPermalinkFeed
diff --git a/templates/feeds/news_description.html b/templates/feeds/news_description.html
deleted file mode 100644
index 61ceedf3..00000000
--- a/templates/feeds/news_description.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<p>{{obj.author.get_full_name}} wrote:</p>
-{{ obj.html }}
diff --git a/templates/feeds/packages_title.html b/templates/feeds/packages_title.html
deleted file mode 100644
index f92ac684..00000000
--- a/templates/feeds/packages_title.html
+++ /dev/null
@@ -1 +0,0 @@
-{{ obj.pkgname }} {{ obj.full_version }} {{ obj.arch.name }} \ No newline at end of file