Skip to content

Commit

Permalink
Fixed #2343: Library.inclusion_tag now accepts a list of template nam…
Browse files Browse the repository at this point in the history
…es 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
  • Loading branch information
jacobian committed Nov 7, 2006
1 parent a888249 commit 4cb2247
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions django/template/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,11 @@ def render(self, context):
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))

Expand Down

0 comments on commit 4cb2247

Please sign in to comment.