furioness / django-challenge-planeks

Service for generating dummy data by user-defined schemes. Check README for login and pass.
https://datagen-challenge.herokuapp.com/
0 stars 0 forks source link

Refactor schema creation/editing to use fields as Django models #3

Closed furioness closed 2 years ago

furioness commented 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.

  1. Each schema field would have its dedicated model linked to a schema.

  2. On view, fields will be grouped by model and rendered by the corresponding formset. Ordering will be on the client side via JS.

  3. On submit, each formset will read POST data and save produced instances. On error just use the view part.

  4. 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.