Skip to content

Commit

Permalink
Added a fab command to automate the initial South conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobian committed Jan 31, 2011
1 parent 37373b3 commit b1db2b4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,13 @@ def managepy(cmd, site='www'):
assert site in ('docs', 'www')
django_admin = env.virtualenv.child('bin', 'django-admin.py')
sudo('%s %s --settings=django_website.settings.%s' % (django_admin, cmd, site))


def southify(app):
"""
Southify an app remotely.
This fakes the initial migration and then migrates forward. Use it the first
time you do a deploy on app that's been newly southified.
"""
managepy('migrate %s 0001 --fake' % app)
managepy('migrate %s' % app)

0 comments on commit b1db2b4

Please sign in to comment.