【发布时间】:2013-04-25 17:26:58
【问题描述】:
当我尝试使用以下代码执行 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')
执行fabric时出现以下错误:
迁移名称应仅包含字母数字字符和 下划线。
使用with cd语句时,local命令无法识别with cd语句中的url,报错如下:
can't open file 'manage.py': [Errno 2] No such file or directory
【问题讨论】:
-
你试过用
with cd代替&&吗? (docs) -
使用cd语句时,local命令无法识别cd语句中的url,报错:can't open file 'manage.py': [Errno 2] No such文件或目录
-
能否请您编辑您的问题并包括您尝试使用
with cd的方式以及您遇到了什么错误? -
如果您找到了解决方案 - 只需回答您自己的问题并接受答案即可。
标签: python django migration fabric django-south