IMHO I think it's more consistent with the definition of certain filters
make the system somehow "lazy" and only evaluate filter variables only when
are used.
El jueves, 22 de junio de 2017, 12:15:53 (UTC-3), Tim Graham escribió:
>
> My question is why is it problematic to put "notreal/notreal2"
# Some examples here for illustrate better my point of view:
from django.template import Context, Template
# CASE_1: shouldn't raise an exception because 'foo' variable exists in the
context and 'default' filter
# shouldn't be invoked,
Template('{{ foo|default:notreal }}').render(Context({'foo':
But if the current behaviour is left intact it goes against the definitions
of filters like 'default' and 'default_if_none'.
If one reads the code snippet example in the ticket, the exception is
raised even when the filter shouldn't be invoked.
So, for me the correct behaviour should be not rai