Skip to content
Trey Stafford edited this page Jun 27, 2014 · 8 revisions

This page contains information relevant to debugging Django views. This page is still in development.

Things to note:

  1. The createPath view is logged by python to /cresis/snfs1/web/ops2/django_logs/createPath.log. This log can be used to monitor progress and track down potential inefficiencies during large path insertions.

  2. The debugView.py script located in the /var/django/ops/ops/ directory can be used to debug views on the server line-by-line using an IDE such as eclipse. See the Using Eclipse page for more information.

  3. If one sets gOps.profileCmd = True in opsCmd.m, the python line_profiler will keep track of the time it takes to run each line of code in a view. This can be useful for tracking down particularly inefficient/slow portions of code. The reports generated by line_profiler are kept in /var/profile-logs/txt/ and can be viewed over the web at serverUrl/profile-logs/

  4. One can set DEBUG = True in /var/django/ops/ops/settings.py to get more detailed error messages from django. This can be useful when a syntax error is present in a view because django will generate an html page showing the first offending line if one opens a view's url in a web browser.