Code

Opened 9 years ago

Closed 7 years ago

#760 closed defect (wontfix)

Error reason not seen when 500 template is missing

Reported by: wojtek@… Owned by: turkey
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When DEBUG = False (production environment) and an error happens, and the 500 template is not provided - one gets a traceback about the template not existing, but does not get a traceback for the exception that caused the actual failure.

Attachments (0)

Change History (11)

comment:1 Changed 9 years ago by rjwittams

I don't think that by default with errors off we should reveal internal implementation details.

One solution for this error template situation would be "last chance" template loader. This would just respond to the 400, 500, and template_debug template names, and would be last in the list of loaders ( maybe appended automatically to this list). It would load extremely simple templates from strings, meaning it only relies on python module loading.

comment:2 Changed 9 years ago by adrian

rjwittams -- That solution sounds good.

comment:3 Changed 9 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 9 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 9 years ago by anonymous

  • Resolution set to wontfix
  • Status changed from reopened to closed

comment:6 Changed 9 years ago by anonymous

  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:7 Changed 9 years ago by anonymous

  • Owner changed from adrian to turkey
  • Status changed from reopened to new

comment:8 Changed 9 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

Hello Mr. Anonymous User!

This thing isn't a toy; please stop using it as one.

comment:9 Changed 9 years ago by hugo

  • Resolution fixed deleted
  • Status changed from closed to reopened

Actually this ticket was open before Mr. Anonymous started to play, so maybe we should keep it open? ;-)

comment:10 Changed 7 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Accepted

comment:11 Changed 7 years ago by jacob

  • Resolution set to wontfix
  • Status changed from reopened to closed

Django's not going to ever include a default 404 or 500 template. If we do, people won't be forced to create their own, and an error will quickly reveal what software your server's running (think "Application Error (Rails)").

However, [4612] adds a comment to the line that will fail so that at least people will get a slightly better idea of where to go next.

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.