Denis, Just a bit of follow-up and status on my work on the Django and SQLAlchemy support.
A summary is that I have been able to generate Django models, use that models.py to create Django database tables, generate a module with `generateDS.py` to generate a module containing Django support, and then use that module to parse an XML instance document and insert the data into a Django database. I've also begun work with the SQLAlchemy support that you contributed. Thank you, again, for that. I can generate models_sa.py. Now, I need to use that to create SQLAlchemy database tables, but I need to learn more about SQLAlchemy in order to do that. I've also begun adding code to `generateDS.py` to generate SQLAlchemy export methods. I'm sure that lots of fixes and work remain to be done. Still, there has been progress, and things look hopeful. I'll report back when I've made more progress. Details follow. Here are some things that I've done: - Made modifications to the code generating Django `models.py`. I became tired of arguing with myself that one-to-many relations should be defined in the container/parent and not the child. Now the ForeignKey is defined in the child. - Added code to `generateDS.py` to generate export methods in each class named `exportDjango`, `exportDjangoAttributes`, and `exportDjangoChildren`. These are generated when `generateDS.py` is run with command line flag --export="django write", for example. - Tested the above by (1) generating a sample `models.py` from a small XML schema; (2) using that model definition to create Django ORM/database tables (`./manage makemigrations`; ./manage migrate`). (3) generating a module with `generateDS.py`; (4) using that generated module to parse a small XML instance document and call the `exportDjango` methods to load that data into the database. - Adding code to `generateDS.py` to generate export methods in each class named `exportSQLAlchemy`, `exportSQLAlchemyAttributes`, and `exportSQLAlchemyChildren`. These are generated when `generateDS.py` is run with command line flag --export="sqlalchemy django", for example. More later, when and if I've made progress. Dave -- Dave Kuhlman http://www.davekuhlman.org ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users