I'm trying to get all the classes I defined in a file so I can then emulate the sqlobject-admin
my own attempt at it revealed something weird. the classes I declare as childs of SQLObject aren't
my ugly code to get this working is
[name for name,cls in turbogears.util.get_model().__dict__.items() if isinstance(cls,sqlobject.declarative.DeclarativeMeta)]
note that turbogears.util.get_model() just gets me the module where the classes are defined.
why are those classes chields of DeclarativeMeta??
I also trace sqlobject-admin back to http://www.sqlobject.org/sqlobject/manager/command.py.html?f=292&l=307#292
but Honestly I don't know how that works.
What I'm trying to create the equivalent of a .sql file in python/sqlobject. So I can do two things.
1- create dummy data for testing
2- create a default set of values in the db to run that script on each deployment.