Closed furioness closed 2 years ago
Refactor schema creation/editing to use fields as Django models and modelForms instead of hacking with JSONField. The goal is to get stuff simpler.
Each schema field would have its dedicated model linked to a schema.
On view, fields will be grouped by model and rendered by the corresponding formset. Ordering will be on the client side via JS.
On submit, each formset will read POST data and save produced instances. On error just use the view part.
Probably will be possible to move all error checking into models and instantiate forms via a formset factory without dedicated classes.
Hopefully, there won't be a div id clashing problem.
Refactor schema creation/editing to use fields as Django models and modelForms instead of hacking with JSONField. The goal is to get stuff simpler.
Each schema field would have its dedicated model linked to a schema.
On view, fields will be grouped by model and rendered by the corresponding formset. Ordering will be on the client side via JS.
On submit, each formset will read POST data and save produced instances. On error just use the view part.
Probably will be possible to move all error checking into models and instantiate forms via a formset factory without dedicated classes.
Hopefully, there won't be a div id clashing problem.