From 0cc369e985dd6376f0367e4b57e980ce14231796 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 31 Jul 2012 00:09:28 -0500 Subject: 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 --- public/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'public/views.py') 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, -- cgit v1.2.3-55-g3dc8