Naftuli Kay
Naftuli Kay

Reputation: 91630

Catching error stacktraces when DEBUG = False

I catch an error whenever I turn my project to DEBUG = False, and since no exceptions are printed, all I get is a You need to create a 500.html template. error message. How can I see the stacktrace of the original error in the manage.py runserver output?

Alternatively, can I create a 500 template which prints out the exception?

Upvotes: 1

Views: 315

Answers (2)

Naftuli Kay
Naftuli Kay

Reputation: 91630

As per @Cat Plus Plus, I needed to set up my SMTP connection to get email notifications of the errors. They included the stacktraces I needed to hear.

Upvotes: 0

krs
krs

Reputation: 4154

To see the output of the runserver -commands stack trace its just a matter of looking at the terminal its running in.

For the 500 page, What would the use case of this be? runserver shouldn't be used outside of DEBUG=True and any real web server would log the error in a file. but to answer your question, i dont think it can be done, and shouldn't be done as your stacktraces can contain sensitive information.

Upvotes: 1

Related Questions