Ticket #1176: comment_without_parse_r1831.diff
File comment_without_parse_r1831.diff, 1.2 KB (added by , 19 years ago) |
---|
-
django/core/template/__init__.py
311 311 self.unclosed_block_tag(parse_until) 312 312 return nodelist 313 313 314 def skip_past(self, endtag): 315 while self.tokens: 316 token = self.next_token() 317 if token.token_type == TOKEN_BLOCK: 318 if token.contents == endtag: 319 return 320 self.unclosed_block_tag([endtag]) 321 314 322 def create_variable_node(self, filter_expression): 315 323 return VariableNode(filter_expression) 316 324 -
django/core/template/defaulttags.py
286 286 """ 287 287 Ignore everything between ``{% comment %}`` and ``{% endcomment %}`` 288 288 """ 289 nodelist = parser.parse(('endcomment',)) 290 parser.delete_first_token() 289 nodelist = parser.skip_past('endcomment') 291 290 return CommentNode() 292 291 comment = register.tag(comment) 293 292