def manage_run(command, sudo=False):
"""Run a Django management command on the remote server."""
require('environment')
manage_base = u"%(virtualenv_root)s/bin/python %(code_root)s/manage.py " % env
with cd(env.code_root):
if sudo:
sudo(u'%s %s' % (manage_base, command))
else:
run(u'%s %s' % (manage_base, command))
评论列表
文章目录