Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#12269 closed (invalid)

exception instead of 404 in production (non-debug) mode

Reported by: tier Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Django version 1.2 pre-alpha SVN-11782
While querying wrong URL on the development server (having DEBUG = False) Django outputs the same:

Traceback (most recent call last):
  File "/home/tier/src/django/django/core/servers/", line 279, in run
    self.result = application(self.environ, self.start_response)
  File "/home/tier/src/django/django/core/servers/", line 651, in __call__
    return self.application(environ, start_response)
  File "/home/tier/src/django/django/core/handlers/", line 241, in __call__
    response = self.get_response(request)
  File "/home/tier/src/django/django/core/handlers/", line 129, in get_response
    return self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/home/tier/src/django/django/core/handlers/", line 177, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/home/tier/src/django/django/views/", line 23, in server_error
    t = loader.get_template(template_name) # You need to create a 500.html template.
  File "/home/tier/src/django/django/template/", line 81, in get_template
    source, origin = find_template_source(template_name)
  File "/home/tier/src/django/django/template/", line 74, in find_template_source
    raise TemplateDoesNotExist, name
TemplateDoesNotExist: 500.html

This traceback text is seen in browser and in console as well.

Change History (2)

comment:1 Changed 9 years ago by Karen Tracey

Resolution: invalid
Status: newclosed

First, fix the problem noted in the exception: # You need to create a 500.html template.

Until you do that you won't be able to track down the underlying problem, which is whatever led to the server looking for the 500.html template in the first place. (Though, if you don't have a 500.html template it might be as simple as not having a 404.html template either.) There are no defaults for these, you need to supply them.

comment:2 Changed 7 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top