From e48398ce9ca112c8fca146ca2aa461c4a93b209a Mon Sep 17 00:00:00 2001 From: Leandro Roberto Date: Wed, 13 Feb 2019 22:47:19 -0200 Subject: [PATCH] =?UTF-8?q?retira=20c=C3=B3digo=20desnecess=C3=A1rio=20de?= =?UTF-8?q?=20verifica=C3=A7=C3=A3o=20de=20fields=20de=20formul=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/crispy_layout_mixin.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py index 8631df0f4..11f2c0000 100644 --- a/sapl/crispy_layout_mixin.py +++ b/sapl/crispy_layout_mixin.py @@ -220,31 +220,10 @@ class CrispyLayoutFormMixin: form.helper = SaplFormHelper() layout = self.get_layout() - """if hasattr(form, '_meta') and \ - hasattr(form._meta, 'fields') and \ - form._meta.fields is not None: - self.validate_layout(form, layout)""" - form.helper.layout = SaplFormLayout(*layout) return form - """def validate_layout(self, form, layout): - fields = set() - for fieldset in layout: - for el in fieldset: - if isinstance(el, str): - continue - for field, size in el: - fields.add(field) - - intersection = set(form._meta.fields) - fields - - if intersection: - raise Exception(_('Os campos {} não aparecem na definição de layout' - ' da interface do usuário').format(intersection)) - """ - @property def list_field_names(self): '''The list of field names to display on table