diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py index 5ffc2533c..ebc570394 100644 --- a/sapl/crispy_layout_mixin.py +++ b/sapl/crispy_layout_mixin.py @@ -1,12 +1,12 @@ from math import ceil -import rtyaml from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, Div, Fieldset, Layout, Submit from django import template from django.utils import formats from django.utils.translation import ugettext as _ +import rtyaml def heads_and_tails(list_of_lists): @@ -54,7 +54,7 @@ def get_field_display(obj, fieldname): field = obj._meta.get_field(fieldname) except: value = getattr(obj, fieldname) - return '', value + return '', str(value) verbose_name = str(field.verbose_name)\ if hasattr(field, 'verbose_name') else '' if hasattr(field, 'choices') and field.choices: diff --git a/sapl/crud/base.py b/sapl/crud/base.py index 1d4182760..c6283aa5c 100644 --- a/sapl/crud/base.py +++ b/sapl/crud/base.py @@ -376,10 +376,7 @@ class CrudListView(PermissionRequiredContainerCrudMixin, ListView): f = m._meta.get_field(f) if hasattr(f, 'related_model') and f.related_model: m = f.related_model - if m == self.model: - s.append(force_text(f.verbose_name)) - else: - s.append(force_text(f.verbose_name)) + s.append(force_text(f.verbose_name)) s = ' / '.join(s) r.append(s) return r