summaryrefslogtreecommitdiff
path: root/public/views.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-12-23 04:41:18 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-12-23 04:41:18 -0500
commit86f1ed1ecc94a6a298eb3f690155b03bf013ca78 (patch)
tree518194f004078e9f30f5939855f68653852f6a88 /public/views.py
parent6607bfb5d9997b26884cc86f40204c19c3ce13a3 (diff)
parentf545de301a3188eefffb79de018d5fda2f03946d (diff)
Merge branch 'master-nomake'
Diffstat (limited to 'public/views.py')
-rw-r--r--public/views.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/public/views.py b/public/views.py
index 92065e3a..f04f357b 100644
--- a/public/views.py
+++ b/public/views.py
@@ -20,12 +20,14 @@ from .utils import get_recent_updates
@cache_control(max_age=300)
def index(request):
if request.user.is_authenticated():
- pkgs = get_recent_updates(testing=True, staging=True)
+ def updates():
+ return get_recent_updates(testing=True, staging=True)
else:
- pkgs = get_recent_updates()
+ def updates():
+ return get_recent_updates()
context = {
'news_updates': News.objects.order_by('-postdate', '-id')[:15],
- 'pkg_updates': pkgs,
+ 'pkg_updates': updates,
}
return render(request, 'public/index.html', context)