因此,我正在使用一个Ant构建脚本通过manage.py
运行一些Django命令,我开始看到一个错误,但即使是从python运行时
C:\Users\markw\work\proj\src>python manage.py makemessages --all
--ignore=unittests\* --no-wrap
CommandError: This script should be run from the Django Git tree or your project
or app tree. If you did indeed run it from the Git checkout or your project or
application, maybe you are just missing the conf/locale (in the django tree) or
locale (for project and application) directory? It is not created automatically,
you have to create it by hand if you want to enable i18n for your project or
application.
我的工作副本中唯一的变化是与ANT相关的,更让我困惑的是,下面的ANT任务正确地完成了(以及从python运行它)
^{pr2}$makemessages
有什么特别的吗?我试着从src
运行它,就像一天前工作的compilemessages
一样,也从mysite
运行,它与django
一起有一个locale
文件夹,其中有.po
文件。在
Dir结构
- proj
-- django
-- conf
-- locale
-- mysite
-- locale
manage.py
设置:
LOCALE_PATHS = (
os.path.join(settings_central.BASE_PATH, 'templates', 'locale',),
os.path.join(settings_central.BASE_PATH, 'mysite', 'locale',),
os.path.join(settings_central.BASE_PATH, 'django', 'locale',),
)
你的项目布局有点不正确。您的项目}。在
locale
目录应该是proj/locale
,而不是{相关问题 更多 >
编程相关推荐