Changes between Initial Version and Version 1 of Ticket #23122
- Timestamp:
- Jul 28, 2014, 3:10:59 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23122
- Property Resolution → wontfix
- Property Status new → closed
-
Ticket #23122 – Description
initial v1 1 1 2 2 Template references to an undefined variable are silently replaced with the empty string: 3 3 {{{ 4 4 {{ undefined_variable }} 5 5 }}} 6 6 is replaced by '' 7 7 … … 14 14 15 15 The simple_tag decorator resolves all variables in the context using: 16 16 {{{ 17 17 resolved_vars = [var.resolve(context) for var in self.vars_to_resolve] 18 18 }}} 19 19 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: 20 20 {{{ 21 21 resolved_vars = [] 22 22 for var in self.vars_to_resolve: … … 27 27 resolved_vars.append(value) 28 28 29 }}}