Sync Fabric with South

Multi tool use


Sync Fabric with South
When i try execute a schemamigration
with south with the following code:
schemamigration
# coding=utf-8
from fabric.api import env, hosts, local, run, cd
def updatebd():
local('cd /Users/gian88/Sites/www/py/WEB/web/web/ && python manage.py schemamigration principal –-auto')
When execute the fabric says the following error:
Migration names should contain only alphanumeric characters and
underscores.
When use the sentences with cd
, the command local not recognize the url in the sentences with cd
and says the following error:
with cd
with cd
can't open file 'manage.py': [Errno 2] No such file or directory
with cd
&&
When use the sentences with cd, the command local not recognize the url in the sentences with cd and says the following error: can't open file 'manage.py': [Errno 2] No such file or directory
– Gianfranco Lemmo
Apr 25 '13 at 18:40
Could you please edit your question and include how you've tried to use
with cd
and what error you've got?– alecxe
Apr 25 '13 at 18:48
with cd
If you've found a solution - just answer to your own question and accept the answer.
– alecxe
Apr 25 '13 at 21:45
1 Answer
1
The solution to the problem is use the command lcd, the sentences is something like this:
def updatebd():
with lcd('/Users/gian88/Sites/www/py/WEB/web/web/'):
local('python manage.py schemamigration principal --auto')
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Have you tried using
with cd
instead of&&
? (docs)– alecxe
Apr 25 '13 at 17:54