summaryrefslogtreecommitdiff
path: root/public/views.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 /public/views.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 'public/views.py')
-rw-r--r--public/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/public/views.py b/public/views.py
index 3f68545c..c8854b72 100644
--- a/public/views.py
+++ b/public/views.py
@@ -16,7 +16,10 @@ from .utils import get_recent_updates
@cache_control(max_age=300)
def index(request):
- pkgs = get_recent_updates()
+ if request.user.is_authenticated():
+ pkgs = get_recent_updates(testing=True, staging=True)
+ else:
+ pkgs = get_recent_updates()
context = {
'news_updates': News.objects.order_by('-postdate', '-id')[:15],
'pkg_updates': pkgs,