django-render-block icon indicating copy to clipboard operation
django-render-block copied to clipboard

Template exception handing is broken when rendering a block

Open danielkeller opened this issue 1 year ago • 0 comments

When I render a block which causes an exception to be thrown (eg NoReverseMatch from {% url %}), I get a nested exception 'NoneType' object has no attribute 'origin' from the except block in django/template/base.py, line 974, in render_annotated. This becomes the "main" exception shown at the top of the page, making the issue harder to debug.

I'm using django 4.2.3 and python 3.11.

danielkeller avatar Aug 27 '23 08:08 danielkeller