diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-12 20:28:49 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-12 20:28:49 -0500 |
commit | 16e941c68ddb2d37d7e94d0c60da7e9d3dba65a0 (patch) | |
tree | 0dc941580251a06870b9ceee159b7685c8a02795 /public | |
parent | f9ae4f860ccf57e84032d7be9426331a9e06e979 (diff) | |
parent | fbbcc8534a25d3e78ef3a319c8aeb127bc5085f0 (diff) |
Merge tag 'release_2012-04-26'parabolaweb-2012-12-12
CSS and display related tweaks
Conflicts:
public/views.py
requirements.txt
requirements_prod.txt
templates/public/download.html
Diffstat (limited to 'public')
-rw-r--r-- | public/views.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/public/views.py b/public/views.py index e031201e..29fec470 100644 --- a/public/views.py +++ b/public/views.py @@ -1,4 +1,5 @@ from datetime import datetime +from operator import attrgetter from django.conf import settings from django.contrib.auth.models import User @@ -6,7 +7,6 @@ from django.db.models import Count, Q from django.http import Http404 from django.shortcuts import redirect from django.views.decorators.cache import cache_control -from django.views.generic import list_detail from django.views.generic.simple import direct_to_template from devel.models import MasterKey, PGPSignature @@ -61,6 +61,16 @@ def donate(request): @cache_control(max_age=300) def download(request): + 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 = { + 'releng_iso_url': settings.ISO_LIST_URL, + 'releng_pxeboot_url': settings.PXEBOOT_URL, + 'mirror_urls': mirror_urls, + } return redirect('//wiki.parabolagnulinux.org/get', permanent=True) @cache_control(max_age=300) |