#18169: Strange exception handling in templates ---------------------------------+-------------------------------- Reporter: jasisz | Owner: nobody Type: Bug | Status: new Component: Template system | Version: 1.4 Severity: Normal | Keywords: template exception Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------------+-------------------------------- Let's see some - maybe strange, but possible and working - template schema.
base.html: {{{ {% block content %} {% block error_here %}{% endblock %} {% endblock %} }}} and some template extending it: {{{ {% extends "base.html" %} {% block content %} content {{ block.super }} {% endblock %} {% block error_here %} error here {% url non_existing_url %} {% endblock %} }}} I was really surprised that in this situation exception from url tag - NoReverseMatch - fails silently, and whole 'error_here' block just don't render. But when the same faulty tag is directly in 'content' block - we see error page. We also see error page when we replace url tag f.e. with some invalid tag - error will be normally returned. All this cases are shown in simple project (fresh django 1.4) which I attach. -- Ticket URL: <https://code.djangoproject.com/ticket/18169> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.