From f7d1940a731370ceee6e1c6eaae2cc2f5bab0432 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 19 Oct 2014 18:30:32 -0500 Subject: Remove usage of templates for RSS feeds Signed-off-by: Dan McGee --- feeds.py | 8 ++++++-- templates/feeds/news_description.html | 2 -- templates/feeds/packages_title.html | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 templates/feeds/news_description.html delete mode 100644 templates/feeds/packages_title.html 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 @@ def item_guid(self, item): 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 @@ def item_author_name(self, item): 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 @@ -

{{obj.author.get_full_name}} wrote:

-{{ 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 -- cgit v1.2.3-54-g00ecf