diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-12-22 21:50:58 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-12-22 21:50:58 -0500 |
commit | 2bfec5b17ca3ee3ea3b347c029b9d8dad3c5b4d0 (patch) | |
tree | 6bda86f6489fbdfdce67d282b20586fc6032735b /public/views.py | |
parent | 3579e3cb34a53abd16da3af78be738c2a4dd0d5c (diff) | |
parent | 36f5e1df9afbeac1d04fee38dde4c28f81144a20 (diff) |
Merge tag 'release_2013-12-19' into archweb-generic
Mirror URL page, other random stuff
Diffstat (limited to 'public/views.py')
-rw-r--r-- | public/views.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/public/views.py b/public/views.py index a5f818dc..d1661afd 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) |