Thursday, August 30, 2012

No exception in template using with and block.super

I am am using with tag to transfer flags to block.super like this:

{% with something=1 %}
{{ block.super }}
{% endwith %}

Now if block.super rises an exception, for example NoReverseMatch,
instead of error page, the {{ block.super }} renders to an empty
string, the exception is swallowed somewhere.

This does not happen without the {% with %} wrapper.

A bug?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment