Mercurial > genshi > genshi-test
comparison markup/template.py @ 13:bf9de5a4c896
Match directives should now also be applied when included indirectly.
For example, a match directive defined in `a.html`, which is included by `b.html`, which in turn is included by `c.html` should now also be applied to `c.html`.
author | cmlenz |
---|---|
date | Mon, 05 Jun 2006 00:03:43 +0000 |
parents | c5890ef863ba |
children | 76b5d4b189e6 |
comparison
equal
deleted
inserted
replaced
12:87238328a71d | 13:bf9de5a4c896 |
---|---|
768 filepath = os.path.join(dirname, filename) | 768 filepath = os.path.join(dirname, filename) |
769 try: | 769 try: |
770 fileobj = file(filepath, 'rt') | 770 fileobj = file(filepath, 'rt') |
771 try: | 771 try: |
772 tmpl = Template(fileobj, filename=filepath) | 772 tmpl = Template(fileobj, filename=filepath) |
773 tmpl.pre_filters.append(IncludeFilter(self)) | 773 tmpl.pre_filters.append(IncludeFilter(self, tmpl)) |
774 finally: | 774 finally: |
775 fileobj.close() | 775 fileobj.close() |
776 self._cache[filename] = tmpl | 776 self._cache[filename] = tmpl |
777 self._mtime[filename] = os.path.getmtime(filepath) | 777 self._mtime[filename] = os.path.getmtime(filepath) |
778 return tmpl | 778 return tmpl |