diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/conf/app_template/admin.py-tpl | 2 | ||||
| -rw-r--r-- | django/conf/app_template/tests.py-tpl | 2 | ||||
| -rw-r--r-- | django/conf/app_template/views.py-tpl | 2 | ||||
| -rw-r--r-- | django/core/management/templates.py | 3 |
4 files changed, 5 insertions, 4 deletions
diff --git a/django/conf/app_template/admin.py-tpl b/django/conf/app_template/admin.py-tpl index 8c38f3f3da..b2ff964e3b 100644 --- a/django/conf/app_template/admin.py-tpl +++ b/django/conf/app_template/admin.py-tpl @@ -1,3 +1,3 @@ -from django.contrib import admin +{{ unicode_literals }}from django.contrib import admin # Register your models here. diff --git a/django/conf/app_template/tests.py-tpl b/django/conf/app_template/tests.py-tpl index 7ce503c2dd..fa96c654d5 100644 --- a/django/conf/app_template/tests.py-tpl +++ b/django/conf/app_template/tests.py-tpl @@ -1,3 +1,3 @@ -from django.test import TestCase +{{ unicode_literals }}from django.test import TestCase # Create your tests here. diff --git a/django/conf/app_template/views.py-tpl b/django/conf/app_template/views.py-tpl index 91ea44a218..61821e705e 100644 --- a/django/conf/app_template/views.py-tpl +++ b/django/conf/app_template/views.py-tpl @@ -1,3 +1,3 @@ -from django.shortcuts import render +{{ unicode_literals }}from django.shortcuts import render # Create your views here. 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 |
