Created
October 31, 2011 02:33
-
-
Save bradmontgomery/1326783 to your computer and use it in GitHub Desktop.
A stab at running remote Django management commands via fabric.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def manage(management_command, args=None): | |
with cd(REMOTE_PROJECT_DIR): | |
cmd = "source /path/to/virtualenv/bin/activate && " | |
cmd += "python manage.py %s %s" % (management_command, args or '') | |
run(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment