1👍
As far as I know, there is no best approach to this task, but I advise you to look into two other options, that has its own pros and contras:
-
Store your user defined data in a JSONfield or pickled field. This will save you a lot of efforts in writing custom managers and NoSQL. If you are worried about storing it along with your fixed structure data, store it in a separate model with one-to-one relationship in a separate InnoDB file for example.
-
Store yours user data in a generalized
(field_id, field_name, content_type)
and(object_id, field_id, field_value)
dictionaries. They can be split by field types (i.e.int
,string
,float
etc.). This approach won’t give you well performing data model from scratch, but smart indexing and partitioning can make it worth noting. And your data query, model structure enforcement will be alot easier from other approaches. -
If you consider using NoSQL or other db for your mutable content, be sure to choose one that has means for your data efficient querying, see this discussion and wiki.