#!/bin/sh

cd /srv/servermon/servermon
sed -i -e 's/managed = False/managed = True/' puppet/models.py
./manage.py syncdb --migrate --noinput
# And now undo it
sed -i -e 's/managed = True/managed = False/' puppet/models.py

#!/bin/sh

cd /srv/servermon/servermon
sed -i -e 's/managed = False/managed = True/' puppet/models.py
./manage.py syncdb --noinput
./manage.py migrate --noinput
# And now undo it
sed -i -e 's/managed = True/managed = False/' puppet/models.py

Use migrate command instead of --migrate to syncdb command
Use migrate command instead of --migrate to syncdb command

In Django 1.7 syncdb command does not take any longer the --migrate
argument. Change the django provisioner to call migrate explicitly
