Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField.

This commit is contained in:
Hasan Ramezani 2019-12-05 09:54:27 +01:00 committed by Mariusz Felisiak
parent 664521c56a
commit 5d674eac87
6 changed files with 116 additions and 4 deletions

View file

@ -93,6 +93,14 @@ class TextFieldModel(models.Model):
return self.field
class SmallAutoFieldModel(models.Model):
id = models.SmallAutoField(primary_key=True)
class BigAutoFieldModel(models.Model):
id = models.BigAutoField(primary_key=True)
# Scene/Character/Line models are used to test full text search. They're
# populated with content from Monty Python and the Holy Grail.
class Scene(models.Model):
@ -148,6 +156,8 @@ class RangeLookupsModel(PostgreSQLModel):
float = models.FloatField(blank=True, null=True)
timestamp = models.DateTimeField(blank=True, null=True)
date = models.DateField(blank=True, null=True)
small_integer = models.SmallIntegerField(blank=True, null=True)
decimal_field = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True)
class JSONModel(PostgreSQLModel):