我正在尝试设置一个在GAE上运行的Django应用程序,并使用on_production_server测试在settings.py中选择dev与生产设置。
然而,当我跑
时python manage.py runserver
我明白了:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
import settings
File "/home/guillaume/myproject/settings.py", line 10, in <module>
from djangoappengine.utils import on_production_server, have_appserver
File "/home/guillaume/myproject/djangoappengine/utils.py", line 18, in <module>
'Error was: %s' % e)
Exception: Could not get appid. Is your app.yaml file missing?
Error was: No module named antlr3
我尝试将以下内容添加到settings.py:
import sys
sys.path.append('/usr/local/google_appengine/lib/')
这条线到了.profile的最后:
PATH="$PATH:/usr/local/google_appengine/"
但两者都没有摆脱错误。我真的很喜欢路径,所以我在这里盲目地摸索。有人可以帮忙吗?