(self, name, globals)
| 793 | |
| 794 | @internalcode |
| 795 | def _load_template(self, name, globals): |
| 796 | if self.loader is None: |
| 797 | raise TypeError('no loader for this environment specified') |
| 798 | cache_key = (weakref.ref(self.loader), name) |
| 799 | if self.cache is not None: |
| 800 | template = self.cache.get(cache_key) |
| 801 | if template is not None and (not self.auto_reload or |
| 802 | template.is_up_to_date): |
| 803 | return template |
| 804 | template = self.loader.load(self, name, globals) |
| 805 | if self.cache is not None: |
| 806 | self.cache[cache_key] = template |
| 807 | return template |
| 808 | |
| 809 | @internalcode |
| 810 | def get_template(self, name, parent=None, globals=None): |
no test coverage detected