3

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

当我在 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

在此先感谢您的帮助。

4

2 回答 2

0

在“C:\Documents and Settings\ltiokhin\My Documents\DJCode\mysite\mysite”文件夹下查找“wsgi.py”。标准 django 应用程序文件可能丢失或被命名为其他文件。

于 2013-04-03T12:31:42.453 回答
0

你使用的是和书中相同的版本吗?上次我遇到这种错误就是因为这个!

或者你是否将wsgi添加到settings.py中的installed_apps?

于 2013-02-26T21:43:41.803 回答