Ticket #9256: root_nodelist.diff

File root_nodelist.diff, 680 bytes (added by Chris Beaven, 16 years ago)
  • django/template/__init__.py

     
    250250        self.filters = {}
    251251        for lib in builtins:
    252252            self.add_library(lib)
     253        self.root_nodelist = None
    253254
    254255    def parse(self, parse_until=None):
    255256        if parse_until is None: parse_until = []
    256257        nodelist = self.create_nodelist()
     258        if self.root_nodelist is None:
     259            self.root_nodelist = nodelist
    257260        while self.tokens:
    258261            token = self.next_token()
    259262            if token.token_type == TOKEN_TEXT:
Back to Top