Models and submodels should have metadata applied to them that enables us to template fields automatically. Right now, the form is hand-constructed in a manner divorced from the actual model definitions, and then models are derived from the manually-constructed fields.
In an ideal situation, a combination of macros and looping should be able to handle any schema config model thrown at it and build the form correctly. This would enable us to change the model schema, without making corresponding changes to the form. This won't happen without building some of the extra data displayed on the form into the models themselves. We will need to ensure that we're doing so in a way that doesn't cause problems with model validation, but I think some classmethods that return the appropriate metadata should be fine.
The form should be updated to match the new metadata embedded in the models.
Models and submodels should have metadata applied to them that enables us to template fields automatically. Right now, the form is hand-constructed in a manner divorced from the actual model definitions, and then models are derived from the manually-constructed fields.
In an ideal situation, a combination of macros and looping should be able to handle any schema config model thrown at it and build the form correctly. This would enable us to change the model schema, without making corresponding changes to the form. This won't happen without building some of the extra data displayed on the form into the models themselves. We will need to ensure that we're doing so in a way that doesn't cause problems with model validation, but I think some classmethods that return the appropriate metadata should be fine.
The form should be updated to match the new metadata embedded in the models.