Skip to content

Instantly share code, notes, and snippets.

@binarymatt
Forked from bradmontgomery/manage_fabric.py
Created October 31, 2011 03:03
Show Gist options
  • Save binarymatt/1326816 to your computer and use it in GitHub Desktop.
Save binarymatt/1326816 to your computer and use it in GitHub Desktop.
A stab at running remote Django management commands via fabric.
def manage(management_command, args=[]):
with cd(REMOTE_PROJECT_DIR):
with prefix('source /path/to/virtualenv/bin/activate'):
run('python manage.py %s %s' % (management_command, ' '.join(args))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment