summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-11-21 02:16:25 +0100
committerDan McGee <dan@archlinux.org>2012-11-21 02:16:25 +0100
commitf7331a0eca351300685ebee494e810d8c82c35b1 (patch)
tree51be653b718cda48187f28f63218d3b3fb44cd26 /public
parent160a08bba5324b25abd9e866b884c91d75e597b0 (diff)
downloadarchweb-f7331a0eca351300685ebee494e810d8c82c35b1.tar.gz
archweb-f7331a0eca351300685ebee494e810d8c82c35b1.tar.xz
Add Release model to releng
This should prevent the need for monthly template updates from Pierre and Thomas; best to just let them enter the data themselves and have it show up on the website. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'public')
-rw-r--r--public/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/public/views.py b/public/views.py
index 3e15f9d..fefe032 100644
--- a/public/views.py
+++ b/public/views.py
@@ -13,6 +13,7 @@ from devel.models import MasterKey, PGPSignature
from main.models import Arch, Repo, Donor
from mirrors.models import MirrorUrl
from news.models import News
+from releng.models import Release
from .utils import get_recent_updates
@@ -77,12 +78,17 @@ def donate(request):
@cache_control(max_age=300)
def download(request):
+ try:
+ release = Release.objects.filter(available=True).latest()
+ except Release.DoesNotExist:
+ release = None
mirror_urls = MirrorUrl.objects.select_related('mirror').filter(
protocol__default=True,
mirror__public=True, mirror__active=True, mirror__isos=True)
sort_by = attrgetter('real_country.name', 'mirror.name')
mirror_urls = sorted(mirror_urls, key=sort_by)
context = {
+ 'release': release,
'releng_iso_url': settings.ISO_LIST_URL,
'releng_pxeboot_url': settings.PXEBOOT_URL,
'mirror_urls': mirror_urls,