Ticket #6950: threadsafe_template_loader-const-correct.diff
File threadsafe_template_loader-const-correct.diff, 1.0 KB (added by , 17 years ago) |
---|
-
django/template/loader.py
46 46 # circular import errors. See Django ticket #1292. 47 47 global template_source_loaders 48 48 if template_source_loaders is None: 49 template_source_loaders = []49 loaders = [] 50 50 for path in settings.TEMPLATE_LOADERS: 51 51 i = path.rfind('.') 52 52 module, attr = path[:i], path[i+1:] … … 62 62 import warnings 63 63 warnings.warn("Your TEMPLATE_LOADERS setting includes %r, but your Python installation doesn't support that type of template loading. Consider removing that line from TEMPLATE_LOADERS." % path) 64 64 else: 65 template_source_loaders.append(func) 65 loaders.append(func) 66 template_source_loaders = tuple(loaders) 66 67 for loader in template_source_loaders: 67 68 try: 68 69 source, display_name = loader(name, dirs)