Luke Ryan Jernejcic

Need A Cheatsheet For Django-South?

November 07, 2010

One of the greatest things about Django is it’s emphasis on apps and reusability and the community that follows it. My Django projects always have apps in them, and one of my most recent favorites is Django-South. The problem is that South is one of those apps that I often use once when I setup my project and then don’t touch for a while (outsite of migrations updates). So to help myself out–and hopefully others as well–I have composed a table of the commands that I use most often in South

CommandDescription
./manage.py schemamigration app\_name –initialIf you have not previously run you app through syncdb use this command to set it up with [South](http://south.aeracode.org/).
./manage.py convert\_to\_south app\_nameUse you already ran your app through syncdb.
./manage.py migrate app\_name –fakeUse this if your like me and often use --initial when I should have used the convert\_to\_south command. This tells South that your database is already setup for the current schema.
./manage.py migrateMigrate the database schema for all the South enabled apps.
./manage.py migrate app\_nameMigrate only the specified app’s database schema
./manage.py schemamigration app\_name –autoUpdate the schema migration for the app.

These are the commands that you will need the most, but of course South is a very well done app and you should check out the South documentation for more advanced options.


Written by Luke Ryan Jernejcic who lives and works in Austin Texas building useful things. Follow him on Twitter