From 5d674eac871a306405b0fbbaeb17bbeba9c68bf3 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Thu, 5 Dec 2019 09:54:27 +0100 Subject: Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField. --- tests/postgres_tests/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/postgres_tests/models.py') diff --git a/tests/postgres_tests/models.py b/tests/postgres_tests/models.py index 2cf47b88c7..8528c59da1 100644 --- a/tests/postgres_tests/models.py +++ b/tests/postgres_tests/models.py @@ -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): -- cgit v1.3