From 5c0dbe11f287d0ab3d4125b870dde470cedb7421 Mon Sep 17 00:00:00 2001 From: volpino Date: Sat, 5 May 2012 10:30:09 +0200 Subject: [PATCH] feeds use manager --- euscanwww/djeuscan/feeds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/euscanwww/djeuscan/feeds.py b/euscanwww/djeuscan/feeds.py index a9ea2d3..f3c58d1 100644 --- a/euscanwww/djeuscan/feeds.py +++ b/euscanwww/djeuscan/feeds.py @@ -53,7 +53,7 @@ class GlobalFeed(BaseFeed): description = "Last euscan changes" def categories(self): - categories = Package.objects.values('category').distinct() + categories = Package.objects.categories() return [category['category'] for category in categories] def items(self): @@ -128,7 +128,7 @@ class CategoryFeed(BaseFeed): feed_type = Atom1Feed def get_object(self, request, category): - if not Package.objects.filter(category=category).count(): + if not Package.objects.categories().count(): raise FeedDoesNotExist return category