summaryrefslogtreecommitdiff
path: root/releng
diff options
context:
space:
mode:
Diffstat (limited to 'releng')
-rw-r--r--releng/fixtures/clockchoices.json55
-rw-r--r--releng/views.py5
2 files changed, 55 insertions, 5 deletions
diff --git a/releng/fixtures/clockchoices.json b/releng/fixtures/clockchoices.json
index f328801a..d2d4eb80 100644
--- a/releng/fixtures/clockchoices.json
+++ b/releng/fixtures/clockchoices.json
@@ -3,21 +3,70 @@
"pk": 1,
"model": "releng.clockchoice",
"fields": {
- "name": "unchanged"
+ "name": "default region/timezone, keep clock"
}
},
{
"pk": 2,
"model": "releng.clockchoice",
"fields": {
- "name": "configured manually"
+ "name": "default region/timezone, change clock manually (UTC)"
}
},
{
"pk": 3,
"model": "releng.clockchoice",
"fields": {
- "name": "NTP"
+ "name": "default region/timezone, change clock with NTP (UTC)"
+ }
+ },
+ {
+ "pk": 4,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "default region/timezone, change clock manually (localtime)"
+ }
+ },
+ {
+ "pk": 5,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "default region/timezone, change clock with NTP (localtime)"
+ }
+ },
+ {
+ "pk": 6,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, keep clock"
+ }
+ },
+ {
+ "pk": 7,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, change clock manually (UTC)"
+ }
+ },
+ {
+ "pk": 8,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, change clock with NTP (UTC)"
+ }
+ },
+ {
+ "pk": 9,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, change clock manually (localtime)"
+ }
+ },
+ {
+ "pk": 10,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, change clock with NTP (localtime)"
}
}
]
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,