jvandal / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

django admin can't edit app when set debug=False run in apache2+mod_wsgi but not error in its server #163

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.set debug=False
2.run in apache2+mod_wsgi
3.the default admin can't edit app

What is the expected output? What do you see instead?
out 404.html
the apache error log:
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1] mod_wsgi (pid=3512):
Exception occurred processing WSGI script 'F:/djangowork/wsgi/mysite.wsgi'.
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]   File
"F:/djangowork/wsgi/mysite.wsgi", line 12, in application
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]     return
_application(environ, start_response)
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]   File
"C:\\Python26\\Lib\\django\\core\\handlers\\wsgi.py", line 241, in __call__
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]     response =
self.get_response(request)
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]   File
"C:\\Python26\\Lib\\django\\core\\handlers\\base.py", line 122, in get_response
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]     return
self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]   File
"C:\\Python26\\Lib\\django\\core\\handlers\\base.py", line 166, in
handle_uncaught_exception
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]     return
callback(request, **param_dict)
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]   File
"C:\\Python26\\Lib\\django\\views\\defaults.py", line 23, in server_error
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]     t =
loader.get_template(template_name) # You need to create a 500.html template.
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]   File
"C:\\Python26\\Lib\\django\\template\\loader.py", line 81, in get_template
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]     source, origin =
find_template_source(template_name)
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]   File
"C:\\Python26\\Lib\\django\\template\\loader.py", line 74, in
find_template_source
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1]     raise
TemplateDoesNotExist, name
[Fri Oct 23 15:23:50 2009] [error] [client 127.0.0.1] TemplateDoesNotExist:
500.html

What version of the product are you using? On what operating system?
apache2 + django 1.1 + python 2.6  windows

Please provide any additional information below.
it's normal when use its own server

Original issue reported on code.google.com by wengyuan...@gmail.com on 27 Oct 2009 at 9:13

GoogleCodeExporter commented 8 years ago
This is a Django issue not a mod_wsgi issue. Use the Django User list instead.

One part of your problem is that you have not defined a custom Django 500.html 
error template page as the 
error message tells you you must do. When an error occurs in Django it can't 
therefore render a page containing 
the error. See Django documentation and otherwise ask on Django user list as 
don't know enough about Django 
to advise you on how to do it.

Original comment by Graham.Dumpleton@gmail.com on 27 Oct 2009 at 9:38