djangosnippets.org: Latest snippets posted by monolarhttps://djangosnippets.org/users/monolar/2008-06-20T12:14:07.979144-05:00monolarDebugFooter middleware with syntax highlighting and code inspection
2008-06-20T12:14:07.979144-05:00monolarhttps://djangosnippets.org/snippets/817/<p>based on Snippet <a href="http://www.djangosnippets.org/snippets/799/">799</a> but added code inspection capabilities. Credit goes to django-logging for the actual inspection code.
</p>
<p>Got the idea from the <a href="http://blog.michaeltrier.com/2008/6/18/this-week-in-django-26-2008-06-16">This Week in Django</a> Podcast ;)
</p>
<p>This adds the filename, lineno, functionname and the actual python-code line which caused a sql statement to be executed.
</p>
<p>Note that …</p>
Freely redistributableDebugFooter middleware with Pygments sql syntax highlighting
2008-06-13T09:50:20.499813-05:00monolarhttps://djangosnippets.org/snippets/799/<p>Based on Snippet <a href="http://www.djangosnippets.org/snippets/766/">766</a> but added syntax highlighting of the sql output via <a href="http://pygments.org/">pygments</a>. The sql output will also be wrapped at 120 characters by default (can be configured by changing WRAP). It degrades nicely if pygments is not installed. This will add quite some cpu-cycles just for printing …</p>
Freely redistributable