Loading django/conf/app_template/apps.py +1 −1 Original line number Diff line number Diff line from django.apps import AppConfig {{ unicode_literals }}from django.apps import AppConfig class {{ camel_case_app_name }}Config(AppConfig): Loading docs/releases/1.9.1.txt +5 −0 Original line number Diff line number Diff line Loading @@ -29,3 +29,8 @@ Bugfixes * Fixed admin's delete confirmation page's summary counts of related objects (:ticket:`25883`). * Added ``from __future__ import unicode_literals`` to the default ``apps.py`` created by ``startapp`` on Python 2 (:ticket:`25909`). Add this line to your own ``apps.py`` files created using Django 1.9 if you want your migrations to work on both Python 2 and Python 3. tests/admin_scripts/tests.py +4 −4 Original line number Diff line number Diff line Loading @@ -610,17 +610,17 @@ class DjangoAdminSettingsDirectory(AdminScriptTestCase): self.addCleanup(shutil.rmtree, app_path) self.assertNoOutput(err) self.assertTrue(os.path.exists(app_path)) unicode_literals_import = "from __future__ import unicode_literals\n" with open(os.path.join(app_path, 'apps.py'), 'r') as f: content = f.read() self.assertIn("class SettingsTestConfig(AppConfig)", content) self.assertIn("name = 'settings_test'", content) if not PY3: self.assertIn(unicode_literals_import, content) if not PY3: with open(os.path.join(app_path, 'models.py'), 'r') as fp: content = fp.read() self.assertIn( "from __future__ import unicode_literals\n", content, ) self.assertIn(unicode_literals_import, content) def test_setup_environ_custom_template(self): "directory: startapp creates the correct directory with a custom template" Loading Loading
django/conf/app_template/apps.py +1 −1 Original line number Diff line number Diff line from django.apps import AppConfig {{ unicode_literals }}from django.apps import AppConfig class {{ camel_case_app_name }}Config(AppConfig): Loading
docs/releases/1.9.1.txt +5 −0 Original line number Diff line number Diff line Loading @@ -29,3 +29,8 @@ Bugfixes * Fixed admin's delete confirmation page's summary counts of related objects (:ticket:`25883`). * Added ``from __future__ import unicode_literals`` to the default ``apps.py`` created by ``startapp`` on Python 2 (:ticket:`25909`). Add this line to your own ``apps.py`` files created using Django 1.9 if you want your migrations to work on both Python 2 and Python 3.
tests/admin_scripts/tests.py +4 −4 Original line number Diff line number Diff line Loading @@ -610,17 +610,17 @@ class DjangoAdminSettingsDirectory(AdminScriptTestCase): self.addCleanup(shutil.rmtree, app_path) self.assertNoOutput(err) self.assertTrue(os.path.exists(app_path)) unicode_literals_import = "from __future__ import unicode_literals\n" with open(os.path.join(app_path, 'apps.py'), 'r') as f: content = f.read() self.assertIn("class SettingsTestConfig(AppConfig)", content) self.assertIn("name = 'settings_test'", content) if not PY3: self.assertIn(unicode_literals_import, content) if not PY3: with open(os.path.join(app_path, 'models.py'), 'r') as fp: content = fp.read() self.assertIn( "from __future__ import unicode_literals\n", content, ) self.assertIn(unicode_literals_import, content) def test_setup_environ_custom_template(self): "directory: startapp creates the correct directory with a custom template" Loading