Appending the request URL to SQL statements in Django
Blog de Simon Willison Posted on June 2, 2010
Appending the request URL to SQL statements in Django. A clever frame-walking monkey-patch which pulls the most recent HttpRequest object out of the Python stack and adds the current request.path to each SQL query as an SQL comment, so you can see it in debugging tools such as slow query logs and the PostgreSQL “select * from pg_stat_activity” query.
Presenting django-devserver, a better runserver
Blog de Simon Willison Posted on February 10, 2010
Presenting django-devserver, a better runserver. I really like this—it’s a Django management command (./manage.py rundevserver) which adds SQL logging and cache access summaries to the console output of Django’s local development server. It solves a similar set of problems to the debug toolbar, but requires slightly less setup and doesn’t inject additional HTML in to ...
django-debug-toolbar
Blog de Simon Willison Posted on September 21, 2009
django-debug-toolbar. The new panel styling for the Django debug toolbar is really slick—here’s a neatly produced screencast demonstrating it (with Gypsy Jazz accompaniment).
Debugging Django in Production Revisited
Blog de Simon Willison Posted on September 7, 2009
Debugging Django in Production Revisited. Eric Holscher expands his show-technical-errors-to-superusers middleware to only show them to users in the group named “Technical Errors”.
Announcing django-viewtools
Blog de Simon Willison Posted on February 17, 2009
Announcing django-viewtools. A really excellent idea—run ./manage.py viewtools --pdb /path/on/site/ to debug a view in your Django project that is raising an error using the Python debugger, or use --profile to run the full request cycle for that URL through the profiler.



