django-render-block
django-render-block copied to clipboard
Template exception handing is broken when rendering a block
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.