Django: convert an application from sqlite to mysql

Posted by jason on July 11, 2011, 6 a.m.
Tags: django mysql python sqlite

Thanks to Steve Lord for this one.

Here's how to take a local django application in sqlite and deploy it into a mysql production environment.

First, use django's manage.py script to dump the data to a json file.

cd <django-project-dir>
python2 manage.py dumpdata <appname> > <appname>.json ...