Ticket #6950: threadsafe_template_loader.diff

File threadsafe_template_loader.diff, 1.1 KB (added by mrts, 17 years ago)
  • django/template/loader.py

     
    4646    # circular import errors. See Django ticket #1292.
    4747    global template_source_loaders
    4848    if template_source_loaders is None:
    49         template_source_loaders = []
     49        templ_src_loaders = []
    5050        for path in settings.TEMPLATE_LOADERS:
    5151            i = path.rfind('.')
    5252            module, attr = path[:i], path[i+1:]
     
    6262                import warnings
    6363                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)
    6464            else:
    65                 template_source_loaders.append(func)
     65                templ_src_loaders.append(func)
     66        template_source_loaders = templ_src_loaders
    6667    for loader in template_source_loaders:
    6768        try:
    6869            source, display_name = loader(name, dirs)
Back to Top