Ticket #15387: django-parse_until.diff

File django-parse_until.diff, 1.2 KB (added by klein4, 13 years ago)

This is my first Django patch. Created with diff -crB from my library root. Apologies if the format is inappropriate.

Line 
1diff -crB django.bak/template/__init__.py django/template/__init__.py
2*** django.bak/template/__init__.py 2011-02-23 06:00:58.000000000 -0600
3--- django/template/__init__.py 2011-02-23 06:49:12.000000000 -0600
4***************
5*** 264,270 ****
6 var_node = self.create_variable_node(filter_expression)
7 self.extend_nodelist(nodelist, var_node,token)
8 elif token.token_type == TOKEN_BLOCK:
9! if token.contents in parse_until:
10 # put token back on token list so calling code knows why it terminated
11 self.prepend_token(token)
12 return nodelist
13--- 264,270 ----
14 var_node = self.create_variable_node(filter_expression)
15 self.extend_nodelist(nodelist, var_node,token)
16 elif token.token_type == TOKEN_BLOCK:
17! if len(token.split_contents()) and token.split_contents()[0] in parse_until:
18 # put token back on token list so calling code knows why it terminated
19 self.prepend_token(token)
20 return nodelist
21Binary files django.bak/template/__init__.pyc and django/template/__init__.pyc differ
Back to Top