diff options
author | Dan McGee <dan@archlinux.org> | 2013-01-14 04:43:11 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-01-14 04:43:11 +0100 |
commit | 019785186ce5861215ece96818513ec21e15df41 (patch) | |
tree | 556d3860f147ff17cf45082c00dc3fa975934e29 | |
parent | 90af2119c25527185e36fb75e6a75107f2d6e5cf (diff) | |
download | archweb-019785186ce5861215ece96818513ec21e15df41.tar.gz archweb-019785186ce5861215ece96818513ec21e15df41.tar.xz |
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 <dan@archlinux.org>
-rw-r--r-- | feeds.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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] |