summaryrefslogtreecommitdiff
path: root/django/template/loader.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-03-18 15:35:15 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-03-18 15:35:15 +0000
commit003fe522254e5ca8659e6bd57a870a29f5c4e0f7 (patch)
tree7c1c121e33d1f1e91550236d340fa9b4ce3845b9 /django/template/loader.py
parent10de2a837f580d76a480a9e0b974cecd2d1d26cb (diff)
Fixed #13123 -- Cleaned up template loader for PyPy compatibility. Thanks to avostryakov for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/template/loader.py')
-rw-r--r--django/template/loader.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/template/loader.py b/django/template/loader.py
index e171360e6a..b8077522fc 100644
--- a/django/template/loader.py
+++ b/django/template/loader.py
@@ -48,9 +48,9 @@ class BaseLoader(object):
template = get_template_from_string(source, origin, template_name)
return template, None
except TemplateDoesNotExist:
- # If compiling the template we found raises TemplateDoesNotExist, back off to
+ # If compiling the template we found raises TemplateDoesNotExist, back off to
# returning the source and display name for the template we were asked to load.
- # This allows for correct identification (later) of the actual template that does
+ # This allows for correct identification (later) of the actual template that does
# not exist.
return source, display_name
@@ -85,7 +85,7 @@ def make_origin(display_name, loader, name, dirs):
return None
def find_template_loader(loader):
- if hasattr(loader, '__iter__'):
+ if isinstance(loader, (tuple, list)):
loader, args = loader[0], loader[1:]
else:
args = []