diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-17 20:53:57 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-17 20:54:01 -0500 |
commit | 871cf5ad2d8a97c2c9f9f20e237999acbf5e5f2a (patch) | |
tree | 20dff624cf69f267afc047812855878a5c69d970 /releng/views.py | |
parent | e5d09fb7e9003b7f96685af9c0a722b45746448e (diff) |
Use verbose name for releng options display
So we see something like 'Hardware Type' instead of 'Hardware_Type'.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'releng/views.py')
-rw-r--r-- | releng/views.py | 5 |
1 files changed, 3 insertions, 2 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 |