summaryrefslogtreecommitdiff
path: root/django/template/utils.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-05-03 21:42:56 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-05-03 21:49:16 +0200
commit1563b897c439370fe98e7902004cdcefc9ea5ceb (patch)
tree6221853aeb8062233f772673be0dd79a771aa4bd /django/template/utils.py
parentdb0a0c4b8ae490d0596f2c210d3edba3d700374a (diff)
Fixed #24685 -- Fixed check for template name unicity.
Thanks Preston Timmons for the report.
Diffstat (limited to 'django/template/utils.py')
-rw-r--r--django/template/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/template/utils.py b/django/template/utils.py
index 514df91a0c..ea72a8c5b1 100644
--- a/django/template/utils.py
+++ b/django/template/utils.py
@@ -50,6 +50,7 @@ class EngineHandler(object):
]
templates = OrderedDict()
+ backend_names = []
for tpl in self._templates:
tpl = tpl.copy()
try:
@@ -68,8 +69,9 @@ class EngineHandler(object):
tpl.setdefault('OPTIONS', {})
templates[tpl['NAME']] = tpl
+ backend_names.append(tpl['NAME'])
- counts = Counter(list(templates))
+ counts = Counter(backend_names)
duplicates = [alias for alias, count in counts.most_common() if count > 1]
if duplicates:
raise ImproperlyConfigured(