You can use the warnings module to raise an error for DeprecationWarning
.
Temporarily add the following snippet to the top of your project's urls.py
:
import warnings
warnings.simplefilter('error', DeprecationWarning)
The DeprecationWarning
will now raise an error, so if debug=True
you'll get the familiar yellow Django error page with the full traceback.
Once you've tracked down the source of the deprecation warnings, remember to remove the snippet! Note that it may be a third party app that is causing the deprecation warnings, not your own code.
If you're new to the warnings module, you might find the page on Python module of the week to be an easier introduction than the Python docs.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…