1
0
mirror of https://github.com/django/django.git synced 2025-10-30 00:56:09 +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

@@ -10,6 +10,14 @@ class MyBigAutoField(models.BigAutoField):
@isolate_apps("model_options")
class TestDefaultPK(SimpleTestCase):
def test_default_value_of_default_auto_field_setting(self):
"""django.conf.global_settings defaults to BigAutoField."""
class MyModel(models.Model):
pass
self.assertIsInstance(MyModel._meta.pk, models.BigAutoField)
@override_settings(DEFAULT_AUTO_FIELD="django.db.models.NonexistentAutoField")
def test_default_auto_field_setting_nonexistent(self):
msg = (