mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField.
This commit is contained in:
parent
664521c56a
commit
5d674eac87
6 changed files with 116 additions and 4 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue