We all know how amazingly exhaustive Django debugging can be, when you enable the
Debug = True option in your settings file. It gives you a full traceback, complete with the str-ed versions of local variables. However, this post deals with the production-time scenario, when you might encounter an un-anticipated error in your code. Such errors can arise out of various reasons, such as-
1. A kind of input you did not anticipate.
2. A logical error of some kind, usually occuring out of boundary cases (like a sqrt function coming across a negative value)
3. (Worst kind) Some type of low-probability scenario you forgot to test.
In such cases, Django serves the 500 status code along with a “Server Error” message. All this is good, and if your application doesnt have any state variables that may get screwed, or low-probability errors aren’t that important to you, then you…
View original post 784 more words