Hi Rob,

Not sure if this helps, but I half wrote a script to dump out the
contents of a database into the Django database API format. I did this
as a way of exporting stuff for initial import. You can grab it here:

http://simon.net.nz/articles/django-database-export-v00001/

It doesn't work properly, in that it doesn't deal with relationships.
That is, if Django's expecting an object (and it will for any FK's),
then you need to make sure that object's instantiated before the
related thing is created, and then place the object into the correct
slot in the creation line rather than the int/string that's there (does
that make sense?).

Solving that defeated me at the time - I wasn't sure how to handle
this. Serious lack of time to figure it out.

However, if you've only got small amounts of data, and don't mind
tweaking the output by hand afterwards, it might help.

Cheers,
Simon



Rob Hudson wrote:
> Off topic question... We're working with a contractor for some
> template/CSS work.  He's got Django on his Mac laptop.  We've got Django
> using a MySQL database.  It would be nice if we could suck up the data
> in SQLite and just zip up our Django directory for him to do his work
> with real content, then he can ship it back and we can unzip it and
> check in his changes.
>
> I don't know of an easy way to get MySQL data into SQLite.  Does anyone
> know?
>
> It may be simpler for him to get MySQL running but if the SQLite way
> were easy, that would be preferred.
> 
> Thanks,
> Rob


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to