gpt4 book ai didi

python - Django Book Ch. 3 : "No Module named mysite.wsgi"

转载 作者:行者123 更新时间:2023-11-28 19:25:10 24 4
gpt4 key购买 nike

我似乎永远都被困在这个问题上,而且我发现的其他线程似乎都没有帮助。

当我在 cmd 中运行 python manage.py runserver 时,我得到了这个输出:

C:\Documents and Settings\ltiokhin\My Documents\DJCode\mysite>python manage.py runserver
Validating models...

0 errors found

Django version 1.4.3, using settings 'settings'

Development server is running at http:___________________________

Quit the server with CTRL-BREAK.

Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x010689 F0>>

Traceback (most recent call last):
File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.
py", line 109, in inner_run
handler = self.get_handler(*args, **options)

File "C:\Python27\lib\site-packages\django\contrib\staticfiles\management\commands\runserver.py", line 24, in get_handler
handler = super(Command, self).get_handler(*args, **options)

File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.py", line 39, in get_handler
return get_internal_wsgi_application()

File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 58, in get_internal_wsgi_application

"could not import module '%s': %s" % (app_path, module_name, e)) django.core.exceptions.ImproperlyConfigured: WSGI application 'mysite.wsgi.appli cation' could not be loaded; could not import module 'mysite.wsgi': No module na med mysite.wsgi

在此先感谢您的帮助。

最佳答案

你用的是书上的那个版本吗?上次我遇到这种错误就是因为这个!

或者你在settings.py的installed_apps中添加了wsgi?

关于python - Django Book Ch. 3 : "No Module named mysite.wsgi",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15098526/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com