diff options
-rw-r--r-- | releng/views.py | 5 | ||||
-rw-r--r-- | templates/releng/result_list.html | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/releng/views.py b/releng/views.py index 7f895a45..2b3d0936 100644 --- a/releng/views.py +++ b/releng/views.py @@ -81,7 +81,7 @@ def calculate_option_overview(field_name): is_rollback = field_name.startswith('rollback_') option = { 'option': model, - 'name': field_name, + 'name': model._meta.verbose_name, 'is_rollback': is_rollback, 'values': [] } @@ -159,11 +159,12 @@ def test_results_for(request, option, value): if option not in Test._meta.get_all_field_names(): raise Http404 option_model = getattr(Test, option).field.rel.to + option_model.verbose_name = option_model._meta.verbose_name real_value = get_object_or_404(option_model, pk=value) test_list = real_value.test_set.select_related().order_by( '-iso__name', '-pk') context = { - 'option': option, + 'option': option_model, 'value': real_value, 'value_id': value, 'test_list': test_list diff --git a/templates/releng/result_list.html b/templates/releng/result_list.html index 7f9ed452..0233bf8c 100644 --- a/templates/releng/result_list.html +++ b/templates/releng/result_list.html @@ -3,7 +3,7 @@ {% block content %} <div class="box"> <h2>Results for: - {% if option %}{{ option|title }}: {{ value }}{% endif %} + {% if option %}{{ option.verbose_name|title }}: {{ value }}{% endif %} {{ iso_name|default:"" }} </h2> |