Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 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: UI/UX:

Description

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/basehttp.py", line 279, in run
    self.result = application(self.environ, self.start_response)
  File "/home/tier/src/django/django/core/servers/basehttp.py", line 651, in __call__
    return self.application(environ, start_response)
  File "/home/tier/src/django/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/home/tier/src/django/django/core/handlers/base.py", line 129, in get_response
    return self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/home/tier/src/django/django/core/handlers/base.py", line 177, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/home/tier/src/django/django/views/defaults.py", 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/loader.py", line 81, in get_template
    source, origin = find_template_source(template_name)
  File "/home/tier/src/django/django/template/loader.py", line 74, in find_template_source
    raise TemplateDoesNotExist, name
TemplateDoesNotExist: 500.html

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

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.