Does the Django ORM have a construct defined that generates tables from each row under a specified column from a given table?
Example:
Suppose we have the following table.
Table: Person
id|name |age
-------------
1 |John |60
2 |Isaac |24
3 |Fred |50
4 |Will |35
Now I want an object that creates a table from each row under name in Person. For the John and Isaac entries this would get me:
Table: John
id|name |age_diff
------------------
1 |Isaac |36
2 |Fred |10
3 |Will |25
Table: Isaac
id|name |age_diff
-------------------
1 |John |36
2 |Fred |26
3 |Will |11
No there isn’t. In stock django tables are created by ‘syncdb’ command and its ORM does not handle dynamic addition or modification of tables.