Django

Code

Changeset 7563

Show
Ignore:
Timestamp:
05/29/08 07:40:25 (6 months ago)
Author:
russellm
Message:

Fixed #6950 -- Modified initialization of template loaders to use a temporary variable instead of directly modifying the global loader list. Thanks, mrts.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/template/loader.py

    r5511 r7563  
    4747    global template_source_loaders 
    4848    if template_source_loaders is None: 
    49         template_source_loaders = [] 
     49        loaders = [] 
    5050        for path in settings.TEMPLATE_LOADERS: 
    5151            i = path.rfind('.') 
     
    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                loaders.append(func) 
     66        template_source_loaders = tuple(loaders) 
    6667    for loader in template_source_loaders: 
    6768        try: