Skip to content
Myr

debugging.txt

This file

Path

docs/src/debugging.txt

27 lines · 1.1 KiB

Last changed by

[svn] again some updates on the documentation for jinja. this time the debugging stuffArmin Ronacherbefore adoptionabc0064

History of this file

Take it

1===================2Debugging Templates3===================45In order to keep templates debuggable you have to do some additional work on6the application side. The traceback module that comes with python currently7does not support the `__loader__` hook which is used by Jinja to provide8templates. Although the import system was implemented three Python versions9ago the default traceback system still doesn't support it.1011However most of the extended web development traceback module support it:1213-  `Colubrid Debugging Middleware`_14-  `cgitb`_15-  `EvalException`_1617Note that the django traceback module currently does not provide this. `A18ticket`_ was filed already so there is hope that this will be fixed.1920To enable debugging you have to use one of those debugging systems or21implement your own one with support for `__loader__`.222324.. _Colubrid Debugging Middleware: http://trac.pocoo.org/repos/colubrid/trunk/colubrid/debug.py25.. _cgitb: http://docs.python.org/lib/module-cgitb.html26.. _EvalException: http://pythonpaste.org/module-paste.evalexception.html27.. _A ticket: http://code.djangoproject.com/ticket/3734