Does anyone have any good suggestions for dumping the data out of my
model into a pythonic format?

I want to be able to back-up the data before dropping and creating
tables, and I want to be able to move the data between different
backends (eg use SQLite for development, then use MySQL for
production).

I can't quite get my head round the best way to do this, but I kind of
assumed I would use nested dictionaries, with the class names as the
main key, and a dictionary as the value, with the id for each field as
the key and the value is another dictionary of field names and values.
 (Or maybe I should just use a list of dictionaries?).

I need to bear in mind here that when I put the data back in (with a
simple script) some of the class names or field names might have
changed, so I will need another nested dictionary (?) of changes that
will override the other dictionary.

As part of this, how can I iterate over each of the classes in my
model?  Do I need to keep a list of classes in my model for me to
iterate over?

Any suggestions, ideas, hints, criticisms, gratefully accepted.

Thanks

Ed

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to