summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/models.py
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2020-03-04 13:33:12 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-03-16 10:27:23 +0100
commit3baf92cf8230ad3a932986170fd07c8feae7ff2f (patch)
treed40a4ccf7e8d693615e908fb40f0612e1495635a /tests/postgres_tests/models.py
parent924c01ba095f7df9529a65c176a892a5c1624ec5 (diff)
Fixed #31340 -- Allowed query expressions in SearchQuery.value and __search lookup.
Diffstat (limited to 'tests/postgres_tests/models.py')
-rw-r--r--tests/postgres_tests/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/postgres_tests/models.py b/tests/postgres_tests/models.py
index 8528c59da1..e803c989e0 100644
--- a/tests/postgres_tests/models.py
+++ b/tests/postgres_tests/models.py
@@ -139,6 +139,11 @@ class Line(PostgreSQLModel):
return self.dialogue or ''
+class LineSavedSearch(PostgreSQLModel):
+ line = models.ForeignKey('Line', models.CASCADE)
+ query = models.CharField(max_length=100)
+
+
class RangesModel(PostgreSQLModel):
ints = IntegerRangeField(blank=True, null=True)
bigints = BigIntegerRangeField(blank=True, null=True)