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
import turbogears
import sqlobject
[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.
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
