Django,无法发消息

时间:2014-07-09 08:21:06

标签: python django internationalization django-admin

我正在撰写这篇文章,因为经过几个小时的研究,没有找到关于我的问题的真正解决方案。

我有一个曾经在另一台计算机上运行的Django项目。现在,我有一个新的,我重新安装了DjangoVirtualEnvWrapper.

我从我的git克隆了我的项目,我可以毫无问题地工作和部署。

当我使用正确的virtualenv(通过workon'my_project_name')时运行./manage.py。

我的问题是我无法再生成翻译了。

这是追溯:

(MyProject)--- python/MyProject ‹master*➔ M› »django-admin.py makemessages --all
Traceback (most recent call last):
File "/usr/local/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 376, in execute
    sys.stdout.write(self.main_help_text() + '\n')
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 240, in main_help_text
    for name, app in six.iteritems(get_commands()):
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
    apps = settings.INSTALLED_APPS
  File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
    self._setup(name)
  File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 49, in _setup
    self._wrapped = Settings(settings_module)
  File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 132, in __init__
    % (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'MyProject.settings.local' (Is it on sys.path? Is there an import error in the settings file?): No module named MyProject.settings.local

当我检查我的sys.path,时,这里是内容:

/Users/jbcollet/.virtualenvs/MyProject/lib/python27.zip
/Users/jbcollet/.virtualenvs/MyProject/lib/python2.7
/Users/jbcollet/.virtualenvs/MyProject/lib/python2.7/plat-darwin
/Users/jbcollet/.virtualenvs/MyProject/lib/python2.7/plat-mac
/Users/jbcollet/.virtualenvs/MyProject/lib/python2.7/plat-mac/lib-scriptpackages
/Users/jbcollet/.virtualenvs/MyProject/Extras/lib/python
/Users/jbcollet/.virtualenvs/MyProject/lib/python2.7/lib-tk
/Users/jbcollet/.virtualenvs/MyProject/lib/python2.7/lib-old
/Users/jbcollet/.virtualenvs/MyProject/lib/python2.7/lib-dynload
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/Users/jbcollet/.virtualenvs/MyProject/lib/python2.7/site-packages

有人可以帮我这个吗?

非常感谢

0 个答案:

没有答案