Django debug page

If you have encountered any exception in development, that is, when DEBUG=True, you would have already seen an error page similar to the following screenshot:

Typical Django error page when your DEBUG setting is turned on

Since it comes up so frequently, most developers tend to miss the wealth of information in this page. Here are some places to take a look at:

  • Exception details: Obviously, you need to read what the exception tells you very carefully.
  • Exception location: This is where Python thinks where the error has occurred. In Django, this may or may not be where the root cause of the bug is.
  • Traceback: This was the ...

Get Django Design Patterns and Best Practices - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.