django-viewtools provides a management command to help in debugging and profiling views
django-viewtools provides a number of management commands for
There are a number of flags that can be used when calling the view
-d, --debug: This sets settings.DEBUG to True before calling the
view. This allows you to retrieve the content from a view in
production when settings.DEBUG is on
-n, --no-debug: This sets settings.DEBUG to False, handy to see what
will happen if DEBUG is turned off.
--pdb: This starts PDB before the request is handled. Great for when
you have a traceback email and want to set a breakpoint where it
--pm: This fires up PDB's post_mortum when an error occurs in the
process of calling a view.
--profile: This dumps a hotshot profile file to the location specified
for profiling the performance of a view.
-q, --quiet: Don't output the response of the view
-m, --mute: Turn off output through stdout and stderr, handy for noisy
views with print statements everywhere.