summaryrefslogtreecommitdiffstats
path: root/releng
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-05-12 10:33:46 -0500
committerDan McGee <dan@archlinux.org>2011-05-12 10:33:46 -0500
commit2261cf40bc5e4a43cc8c1618eb54267da8805f89 (patch)
treee1b80cc28241b4a28a122d48c2a78a027a3b9cd6 /releng
parent2470c543d60c96343a5b0fefe04464b5b445b859 (diff)
downloadarchweb-2261cf40bc5e4a43cc8c1618eb54267da8805f89.tar.gz
archweb-2261cf40bc5e4a43cc8c1618eb54267da8805f89.zip
Put most recent ISOs first in lists
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'releng')
-rw-r--r--releng/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/releng/views.py b/releng/views.py
index a810bbbc..3180a9ed 100644
--- a/releng/views.py
+++ b/releng/views.py
@@ -14,7 +14,8 @@ def standard_field(model, empty_label=None, help_text=None, required=True):
help_text=help_text, required=required)
class TestForm(forms.ModelForm):
- iso = forms.ModelChoiceField(queryset=Iso.objects.filter(active=True))
+ iso = forms.ModelChoiceField(queryset=Iso.objects.filter(
+ active=True).order_by('-id'))
architecture = standard_field(Architecture)
iso_type = standard_field(IsoType)
boot_type = standard_field(BootType)
@@ -121,7 +122,7 @@ def test_results_for(request, option, value):
raise Http404
option_model = getattr(Test, option).field.rel.to
real_value = get_object_or_404(option_model, pk=value)
- test_list = real_value.test_set.order_by("iso__name", "pk")
+ test_list = real_value.test_set.order_by('-iso__name', '-pk')
context = {
'option': option,
'value': real_value,