Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named web.settings #4

Closed
panyhabc opened this issue Jul 23, 2019 · 3 comments
Closed

ImportError: No module named web.settings #4

panyhabc opened this issue Jul 23, 2019 · 3 comments

Comments

@panyhabc
Copy link

执行命令python manage.py runserver 127.0.0.1 8080不成功,提示错误ImportError: No module named web.settings。
在网上查找了一些解决方法,比如在wsgi.py 中添加下列语句:
path = os.path.dirname(os.path.dirname(os.path.abspath(file)))
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'web.settings'
但还是存在该问题。

@C4o
Copy link
Owner

C4o commented Jul 23, 2019

这个跟darkweb.py是分开的,这个就是个把darkweb.py入库的信息给读出来并且显示的一个django web,其实可以直接看sqlite的内容。

@panyhabc
Copy link
Author

我是想能用则用,不想自己写了,哈哈

@xdx3000
Copy link

xdx3000 commented Sep 15, 2019

执行命令python manage.py runserver 127.0.0.1 8080不成功,提示错误ImportError: No module named web.settings。
在网上查找了一些解决方法,比如在wsgi.py 中添加下列语句:
path = os.path.dirname(os.path.dirname(os.path.abspath(file)))
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'web.settings'
但还是存在该问题。

这是python2.7的问题吧。在web目录下新建一个 init.py 文件即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants