﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23122	simple_tag should ignore undefined arguments to be consistent with template language	adriannye@…	nobody	"
Template references to an undefined variable are silently replaced with the empty string:
{{{
{{ undefined_variable }}
}}}
is replaced by ''

But if that same variable is referenced as an argument to a templatetag that uses the simple_tag decorator,
it will return an exception:

{% my_simple_tag undefined_variable %}

raises an exception.  This also happens if there are multiple arguments and any one of them is undefined.

The simple_tag decorator resolves all variables in the context using:
{{{
resolved_vars = [var.resolve(context) for var in self.vars_to_resolve]
}}}
It would be better if this code handled the variable consistently, so that users could switch back and forth from using a templatetag or not and see the same result.  One way would be to replace the above code with the following:
{{{
                    resolved_vars = []
                    for var in self.vars_to_resolve:
                        try:
                            value = var.resolve(context)
                        except VariableDoesNotExist:
                            value = None
                        resolved_vars.append(value)

}}}"	Bug	closed	Template system	1.6	Normal	wontfix			Unreviewed	1	0	0	0	1	0
