Django

Code

Ticket #6950: loader.patch

File loader.patch, 0.6 kB (added by bear330, 3 months ago)

A simple patch to make sure template_source_loaders is initialized correctly.

  • loader.py

    old new  
    4545    # because putting this logic in the module-level namespace may cause 
    4646    # circular import errors. See Django ticket #1292. 
    4747    global template_source_loaders 
    48     if template_source_loaders is None
     48    if template_source_loaders is None or len(template_source_loaders) != settings.TEMPLATE_LOADERS
    4949        template_source_loaders = [] 
    5050        for path in settings.TEMPLATE_LOADERS: 
    5151            i = path.rfind('.')