1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #5445: added some compatibility code for the lack of __iter__ in Jython 2.2. Thanks, Leo Soto.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss
2007-09-14 19:55:24 +00:00
parent 1ea702dd23
commit ad077ccbc0
6 changed files with 29 additions and 13 deletions

View File

@@ -58,6 +58,7 @@ import re
from inspect import getargspec
from django.conf import settings
from django.template.context import Context, RequestContext, ContextPopException
from django.utils.itercompat import is_iterable
from django.utils.functional import curry, Promise
from django.utils.text import smart_split
from django.utils.encoding import smart_unicode, force_unicode
@@ -900,7 +901,7 @@ class Library(object):
if not getattr(self, 'nodelist', False):
from django.template.loader import get_template, select_template
if hasattr(file_name, '__iter__'):
if not isinstance(file_name, basestring) and is_iterable(file_name):
t = select_template(file_name)
else:
t = get_template(file_name)