summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorIvan <righiy90@gmail.com>2016-09-03 19:00:00 +0300
committerTim Graham <timograham@gmail.com>2016-09-03 12:00:00 -0400
commit9a2a52558e080f109a27d40a033a135c9d0e7e50 (patch)
tree256cb5ba46f97d795ecdcb3d6c79e772d5f12cee /django/core
parent277fe2e8f2ee35cd389b079ce7691491bb5738ec (diff)
Fixed #27171 -- Added unicode_literals and coding preamble to all files in startapp template on Python 2.
Diffstat (limited to 'django/core')
-rw-r--r--django/core/management/templates.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/management/templates.py b/django/core/management/templates.py
index df522e809c..fd957fbabf 100644
--- a/django/core/management/templates.py
+++ b/django/core/management/templates.py
@@ -114,7 +114,8 @@ class TemplateCommand(BaseCommand):
camel_case_name: camel_case_value,
'docs_version': get_docs_version(),
'django_version': django.__version__,
- 'unicode_literals': '' if six.PY3 else 'from __future__ import unicode_literals\n\n',
+ 'unicode_literals': '' if six.PY3 else '# -*- coding: utf-8 -*-\n'
+ 'from __future__ import unicode_literals\n\n',
}), autoescape=False)
# Setup a stub settings environment for template rendering