1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2006-11-07 04:13:06 +00:00
parent a888249770
commit 4cb2247327

View File

@ -868,8 +868,11 @@ class Library(object):
dict = func(*args)
if not getattr(self, 'nodelist', False):
from django.template.loader import get_template
t = get_template(file_name)
from django.template.loader import get_template, select_template
if hasattr(file_name, '__iter__'):
t = select_template(file_name)
else:
t = get_template(file_name)
self.nodelist = t.nodelist
return self.nodelist.render(context_class(dict))