Ticket #398: implicit-end.diff
File implicit-end.diff, 1.1 KB (added by , 19 years ago) |
---|
-
django-trunk/django/core/template.py
55 55 '\n<html>\n\n</html>\n' 56 56 """ 57 57 import re 58 import inspect 58 59 59 60 __all__ = ('Template','Context','compile_string') 60 61 … … 216 217 raise TemplateSyntaxError, "Empty block tag" 217 218 try: 218 219 # execute callback function for this tag and append resulting node 219 nodelist.append(registered_tags[command](self, token)) 220 callback = registered_tags[command] 221 (args, _, _, _) = inspect.getargspec(callback) 222 if len(args) == 3: 223 node = callback(self, token, parse_until) 224 else: 225 node = callback(self, token) 226 nodelist.append(node) 220 227 except KeyError: 221 228 raise TemplateSyntaxError, "Invalid block tag: '%s'" % command 222 229 if parse_until: