summaryrefslogtreecommitdiff
path: root/feeds.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-13 21:43:11 -0600
committerDan McGee <dan@archlinux.org>2013-01-13 21:43:11 -0600
commit019785186ce5861215ece96818513ec21e15df41 (patch)
tree556d3860f147ff17cf45082c00dc3fa975934e29 /feeds.py
parent90af2119c25527185e36fb75e6a75107f2d6e5cf (diff)
Add __name__ attribute to class-based Feeds viewsrelease_2013-01-13
This should hopefully allow these views to not be labeled as '_wrapped_view' in performance monitoring output. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'feeds.py')
-rw-r--r--feeds.py4
1 files changed, 4 insertions, 0 deletions
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]