Owen Mead-Robins wrote:
> Any TG projects out there have data import capabilities? In the very
> near future Oprius Software will be developing an address book &
> calendar data import/export tool. Since this is fairly generic in
> nature I was wondering if anyone else has / is / will be working on
> this? Sharing of ideas / code / widgets would save both parties time
> and resources.
>   
We have written code to update a database of users with a CSV dump of 
another database.  This code used the csv module from the standard 
library, to return an iterator over dicts.  We then processed these flat 
dictionaries into trees of dictionaries, using as keys the attributes of 
the objects the model.  We can then compare these trees to the objects 
from the database, and construct new ones if they are different.  The 
code is slow, inelegant, incredibly fragile, barely tested, probably 
inherently specific to SQLObject, very specific to our project, and 
above all stupid and ugly.  It badly needs rewriting, but I think that 
the approach is probably right, or at least as close as you can get with 
SQLObject.

I'd be very interested in seeing a better written and more general 
version of what I described above, and would be willing to get 
involved.  Is this the sort of thing you're thinking of?

Peter Russell

--~--~---------~--~----~------------~-------~--~----~
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