Hi, Maybe this question has already been asked, but I am wondering why Jinja2 compatibility can't be fixed in a clean way. Currently the code assumes that if an exception has a "source" attribute that it's a Django exception and can be processed as such. (the code: http://code.djangoproject.com/browser/django/trunk/django/views/debug.py#L87 )
However, if all template exceptions have the same base exception (as they logically should) wouldn't it automatically work if you simply test for the exception? There has been a previous ticket with a hacky solution: http://code.djangoproject.com/ticket/10216 But I feel that testing for specific exceptions (as any try/except should) would make the code cleaner and fix this problem. Assuming that any exception with a source attribute can be processed as the expected Django exception is simply wrong. Right now you can break the entire debugging system by simply raising an exception like this: class MyException(Exception): source = 'Breaking the Django template debugger' ~Rick
signature.asc
Description: This is a digitally signed message part.