Django和WSGI:再次出现错误500

Django和WSGI:再次出现错误500,django,apache,mod-wsgi,Django,Apache,Mod Wsgi,嗯,我一次又一次地得到这个500错误。几天来一切似乎都正常,但当我现在尝试在浏览器中加载网站时,它返回了我500。Apache日志不是描述性的,我只能看到: Sun May 26 20:39:34 2013] [error] [client 188.134.73.102] mod_wsgi (pid=5087): Exception occurred processing WSGI script '/var/www/empirik/data/www/mywebsite.com.ru/myproj

嗯,我一次又一次地得到这个500错误。几天来一切似乎都正常,但当我现在尝试在浏览器中加载网站时,它返回了我500。Apache日志不是描述性的,我只能看到:

Sun May 26 20:39:34 2013] [error] [client 188.134.73.102] mod_wsgi (pid=5087): Exception occurred processing WSGI script '/var/www/empirik/data/www/mywebsite.com.ru/myproject/wsgi.py'.
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102] Traceback (most recent call last):
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]     response = self.get_response(request)
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 179, in get_response
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]     return callback(request, **param_dict)
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]   File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]     response = view_func(request, *args, **kwargs)
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]   File "/usr/local/lib/python2.7/site-packages/django/views/defaults.py", line 32, in server_error
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]     t = loader.get_template(template_name) # You need to create a 500.html template.
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]   File "/usr/local/lib/python2.7/site-packages/django/template/loader.py", line 145, in get_template
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]     template, origin = find_template(template_name)
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]   File "/usr/local/lib/python2.7/site-packages/django/template/loader.py", line 138, in find_template
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102]     raise TemplateDoesNotExist(name)
[Sun May 26 20:39:34 2013] [error] [client 188.134.73.102] TemplateDoesNotExist: 500.html

有没有什么方法可以获得比这个模板没有texist异常更具体的信息?

好吧,多亏了alecxe,我找到了问题的原因。当DEBUG=False时,只允许使用所需的\u HOSTS特性。

一种方法是临时设置DEBUG=True,并查看包含大量有用信息的标准django错误页面。同样,考虑定义像.500那样的HTML建议。希望有帮助。