comocheng / kineticmodelssite

a django site for kinetic models
4 stars 9 forks source link

Replace kinetics multi-table inheritance with JSON fields #158

Closed kiancm closed 3 years ago

kiancm commented 3 years ago

I was hesitant to make any changes to what we have currently because "it works" and validating JSON as well as losing the ability to query the actual kinetics were really bad things to lose, but I found solutions to both of these:

  1. The pydantic library lets you define a JSON schema and validate data against it
  2. The JSONField can actually be queried on its fields as well!