diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2019-12-05 09:54:27 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-05 15:50:39 +0100 |
| commit | 5d674eac871a306405b0fbbaeb17bbeba9c68bf3 (patch) | |
| tree | 39f827b82af94b862d9e373d30fef52226e4bcdb /tests/postgres_tests/models.py | |
| parent | 664521c56aa72e7749292e4b8d92f093421463b5 (diff) | |
Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField.
Diffstat (limited to 'tests/postgres_tests/models.py')
| -rw-r--r-- | tests/postgres_tests/models.py | 10 |
1 files changed, 10 insertions, 0 deletions
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): |
