Django

Code

Changeset 4038

Show
Ignore:
Timestamp:
11/06/06 22:13:06 (2 years ago)
Author:
jacob
Message:

Fixed #2343: Library.inclusion_tag now accepts a list of template names along with a single name. Thanks, mderk@yandex.ru

Files:

Legend:

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

    r3951 r4038  
    869869 
    870870                    if not getattr(self, 'nodelist', False): 
    871                         from django.template.loader import get_template 
    872                         t = get_template(file_name) 
     871                        from django.template.loader import get_template, select_template 
     872                        if hasattr(file_name, '__iter__'): 
     873                            t = select_template(file_name) 
     874                        else: 
     875                            t = get_template(file_name) 
    873876                        self.nodelist = t.nodelist 
    874877                    return self.nodelist.render(context_class(dict))