summaryrefslogtreecommitdiff
path: root/public/views.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-12-22 21:57:02 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-12-22 21:57:02 -0500
commitf545de301a3188eefffb79de018d5fda2f03946d (patch)
treec30c10c3cef88d84a6e38a43b63ddf5c4f83d2f5 /public/views.py
parent2e634dc457a35d06ec83409da3d6006107495569 (diff)
parent2bfec5b17ca3ee3ea3b347c029b9d8dad3c5b4d0 (diff)
Merge branch 'archweb-generic' into master-nomake
Conflicts: README.md
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)