summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@oscaro.com>2015-02-22 19:14:05 +0100
committerAymeric Augustin <aymeric.augustin@oscaro.com>2015-02-22 23:22:19 +0100
commit19c2fe04a83fb03408a239e6553ffcbefde60346 (patch)
tree3f70f0cb2e4b16dd6b3f04d49a5d8b2e3c83c12c /django/core
parentddc1e0c0fbd9b8b1851d47f2e535e8c2a5b941f6 (diff)
[1.8.x] Fixed a few uses of Template that relied on a default engine.
Refs #24389. Backport of 556a748 from master
Diffstat (limited to 'django/core')
-rw-r--r--django/core/management/templates.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/templates.py b/django/core/management/templates.py
index 6648fafde9..275b2100aa 100644
--- a/django/core/management/templates.py
+++ b/django/core/management/templates.py
@@ -13,7 +13,7 @@ from os import path
import django
from django.core.management.base import BaseCommand, CommandError
from django.core.management.utils import handle_extensions
-from django.template import Context, Template
+from django.template import Context, Engine
from django.utils import archive
from django.utils._os import rmtree_errorhandler
from django.utils.six.moves.urllib.request import urlretrieve
@@ -148,7 +148,7 @@ class TemplateCommand(BaseCommand):
content = template_file.read()
if filename.endswith(extensions) or filename in extra_files:
content = content.decode('utf-8')
- template = Template(content)
+ template = Engine().from_string(content)
content = template.render(context)
content = content.encode('utf-8')
with open(new_path, 'wb') as new_file: