Add colander magic for association proxy fields

hopefully now any association proxy fields which are included, will be given
the appropriate type and widget.  however this still doesn't work for the
readonly rendering of fields...
This commit is contained in:
Lance Edgar 2017-11-21 11:11:18 -06:00
parent 6ea88808b2
commit 9c205d7da5
2 changed files with 102 additions and 25 deletions

View file

@ -64,14 +64,8 @@ class DepartmentsView(MasterView):
super(DepartmentsView, self).configure_form(f)
f.remove_field('subdepartments')
f.remove_field('employees')
# TODO: widget should not be necessary, per type
f.set_type('product', 'boolean')
f.set_widget('product', dfwidget.CheckboxWidget())
# TODO: widget should not be necessary, per type
f.set_type('personnel', 'boolean')
f.set_widget('personnel', dfwidget.CheckboxWidget())
def template_kwargs_view(self, **kwargs):
department = kwargs['instance']