On Fri, May 04, 2007 at 11:13:36PM -0000, Milan Andric wrote: > I'm migrating a tutorials site to Django and have created a file model > that is associated with tutorial pages, etc. Now I need to go through > and migrate all the old content. Rather than upload 400 images I was > hoping to write a script to call the File.save() method appropriately > and just copy the images into the new location. > > Any thoughts on how to approach this? Do you think this will likely > take more time than just doing it by hand?
When I was migrating my site from Zope to Django I added a migrate.py module to the app I was migrating to. In there I wrote a function to do the migration. I would run it like this: # python manage.py shell >>> from blog.migrate import loadCOREBlog In loadCOREBlog I loaded all of the Zope libraries and started iterating through whatever needed to be migrated. When I detected a problem I would use Python's code.interact function to get a shell at that point in my script to help deal with any unexpected migration issues. http://refried.org/viewvc/viewvc.py/refriedorg/blog/migrate.py?view=markup Nate --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---