From 019785186ce5861215ece96818513ec21e15df41 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 13 Jan 2013 21:43:11 -0600 Subject: Add __name__ attribute to class-based Feeds views This should hopefully allow these views to not be labeled as '_wrapped_view' in performance monitoring output. Signed-off-by: Dan McGee --- feeds.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/feeds.py b/feeds.py index 49e0bc6e..c5bdbdee 100644 --- a/feeds.py +++ b/feeds.py @@ -52,6 +52,8 @@ class PackageFeed(Feed): wrapper = condition(etag_func=package_etag, last_modified_func=package_last_modified) return wrapper(super(PackageFeed, self).__call__)(request, *args, **kwargs) + __name__ = 'package_feed' + def get_object(self, request, arch='', repo=''): obj = dict() qs = Package.objects.normal().order_by('-last_update') @@ -135,6 +137,8 @@ class NewsFeed(Feed): wrapper = condition(etag_func=news_etag, last_modified_func=news_last_modified) return wrapper(super(NewsFeed, self).__call__)(request, *args, **kwargs) + __name__ = 'news_feed' + def items(self): return News.objects.select_related('author').order_by( '-postdate', '-id')[:10] -- cgit v1.2.3-2-g168b