summaryrefslogtreecommitdiff
path: root/feeds.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-31 00:09:28 -0500
committerDan McGee <dan@archlinux.org>2012-07-31 00:09:28 -0500
commit0cc369e985dd6376f0367e4b57e980ce14231796 (patch)
tree0ab0829d0d3a8465815178fdf5136e358f538891 /feeds.py
parent56a147d5b92935bf8326230bc5445ab0e0a114e9 (diff)
Update several bits and pieces for staging packages
This will prevent [staging] packages from cluttering normal user's view on the website, but allow us to still import everything from this repository for developer use. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'feeds.py')
-rw-r--r--feeds.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/feeds.py b/feeds.py
index 2e9b349b..d6a97533 100644
--- a/feeds.py
+++ b/feeds.py
@@ -38,6 +38,7 @@ def package_etag(request, *args, **kwargs):
def package_last_modified(request, *args, **kwargs):
return retrieve_latest(Package)
+
class PackageFeed(Feed):
feed_type = GuidNotPermalinkFeed
@@ -51,8 +52,7 @@ class PackageFeed(Feed):
def get_object(self, request, arch='', repo=''):
obj = dict()
- qs = Package.objects.normal().order_by(
- '-last_update')
+ qs = Package.objects.normal().order_by('-last_update')
if arch != '':
# feed for a single arch, also include 'any' packages everywhere
@@ -64,6 +64,8 @@ class PackageFeed(Feed):
r = Repo.objects.get(name__iexact=repo)
qs = qs.filter(repo=r)
obj['repo'] = r
+ else:
+ qs = qs.filter(repo__staging=False)
obj['qs'] = qs[:50]
return obj
@@ -114,6 +116,7 @@ def news_etag(request, *args, **kwargs):
def news_last_modified(request, *args, **kwargs):
return retrieve_latest(News, 'last_modified')
+
class NewsFeed(Feed):
feed_type = GuidNotPermalinkFeed