【发布时间】:2016-07-05 06:13:06
【问题描述】:
我的 Django 项目中有一个 python 脚本,旨在与 Django 应用程序分开运行。我想在我的 Django 应用程序上使用 settings.py 我该怎么做。
当我尝试导入时
from django.conf import settings
我明白了
ImportError: No module named DjangoTastypie.settings
我的项目结构
我正在使用 eclipse-> 作为 python 运行
【问题讨论】:
-
你能添加你的项目结构吗?你是如何运行你的脚本的?
-
尝试运行
python myscript.py -
得到同样的错误
-
看起来您的项目不在您的
PYTHONPATH中。而且我在您的项目中没有看到您的脚本。