1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +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:
Diederik van der Boor
2017-07-13 13:55:23 +02:00
committed by Mariusz Felisiak
parent 1af469e67f
commit 25f21bd237
6 changed files with 97 additions and 4 deletions

View File

@@ -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()