1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Fixed #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField.

This commit is contained in:
Tim Graham
2025-08-19 15:08:43 -04:00
committed by Jacob Walls
parent 0ddbe12ea9
commit 2a636118da
26 changed files with 114 additions and 252 deletions

View File

@@ -75,7 +75,6 @@ class AdminScriptTestCase(SimpleTestCase):
settings_file.write("%s\n" % extra)
exports = [
"DATABASES",
"DEFAULT_AUTO_FIELD",
"ROOT_URLCONF",
"SECRET_KEY",
"USE_TZ",
@@ -3127,11 +3126,6 @@ class StartApp(AdminScriptTestCase):
with open(os.path.join(app_path, "apps.py")) as f:
content = f.read()
self.assertIn("class NewAppConfig(AppConfig)", content)
if HAS_BLACK:
test_str = 'default_auto_field = "django.db.models.BigAutoField"'
else:
test_str = "default_auto_field = 'django.db.models.BigAutoField'"
self.assertIn(test_str, content)
self.assertIn(
'name = "new_app"' if HAS_BLACK else "name = 'new_app'",
content,