Ticket #1672: defaulttags.patch
File defaulttags.patch, 1.0 KB (added by , 19 years ago) |
---|
-
home/ese/var/python/django/django_src/django/core/template/defaulttags.py
136 136 return "<IfEqualNode>" 137 137 138 138 def render(self, context): 139 val1 = resolve_variable(self.var1, context) 140 val2 = resolve_variable(self.var2, context) 139 try: 140 val1 = resolve_variable(self.var1, context) 141 val2 = resolve_variable(self.var2, context) 142 except VariableDoesNotExist: 143 if self.negate: 144 return self.nodelist_true.render(context) 145 else: 146 return self.nodelist_false.render(context) 141 147 if (self.negate and val1 != val2) or (not self.negate and val1 == val2): 142 148 return self.nodelist_true.render(context) 143 149 return self.nodelist_false.render(context)