mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #28393 -- Added helpful error messages for invalid AutoField/FloatField/IntegerField values.
Co-authored-by: Diederik van der Boor <vdboor@edoburu.nl> Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
This commit is contained in:
committed by
Mariusz Felisiak
parent
1af469e67f
commit
25f21bd237
@@ -92,6 +92,18 @@ class UnicodeSlugField(models.Model):
|
||||
s = models.SlugField(max_length=255, allow_unicode=True)
|
||||
|
||||
|
||||
class AutoModel(models.Model):
|
||||
value = models.AutoField(primary_key=True)
|
||||
|
||||
|
||||
class BigAutoModel(models.Model):
|
||||
value = models.BigAutoField(primary_key=True)
|
||||
|
||||
|
||||
class SmallAutoModel(models.Model):
|
||||
value = models.SmallAutoField(primary_key=True)
|
||||
|
||||
|
||||
class SmallIntegerModel(models.Model):
|
||||
value = models.SmallIntegerField()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user