I was looking for something similar to print_r in PHP for Django. I haven’t really found something other than:
import pprint
pprint.pprint(dir(modelorobject))
and using:
{% debug %}
in your template, wich display all kinds of debug info.
If anyone has more info on debugging Django, or a print_r kind of way of outputting debug info, please use the comments.
In this context the Django debug toolbar is also worth mentioning:
More info on the Django Debug Toolbar can be found here:
http://rob.cogit8.org/blog/2008/Sep/19/introducing-django-debug-toolbar/
Discussion
No comments for “Debugging Django”
Post a comment