summaryrefslogtreecommitdiff
path: root/tests/expressions/models.py
AgeCommit message (Collapse)Author
2024-08-06Fixed CVE-2024-42005 -- Mitigated QuerySet.values() SQL injection attacks ↵Simon Charette
against JSON fields. Thanks Eyal (eyalgabay) for the report.
2024-06-21Fixed Number.__str__() crash when float/decimal_value is None in expressions ↵Tim Graham
tests models.
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-12-30Fixed #29049 -- Added slicing notation to F expressions.Nick Pope
Co-authored-by: Priyansh Saxena <askpriyansh@gmail.com> Co-authored-by: Niclas Olofsson <n@niclasolofsson.se> Co-authored-by: David Smith <smithdc@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Abhinav Yadav <abhinav.sny.2002@gmail.com>
2023-09-01Fixed #34803 -- Fixed queryset crash when filtering againts deeply nested ↵willzhao
OuterRef annotations. Thanks Pierre-Nicolas Rigal for the report. Regression in c67ea79aa981ae82595d89f8018a41fcd842e7c9.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-06-01Fixed #32793 -- Fixed loss of precision for temporal operations with ↵Mariusz Felisiak
DecimalFields on MySQL. Regression in 1e38f1191de21b6e96736f58df57dfb851a28c1f. Thanks Mohsen Tamiz for the report.
2021-04-20Refs #25287 -- Added support for multiplying and dividing DurationField by ↵Tobias Bengfort
scalar values on SQLite.
2020-05-04Changed `'%s' % value` pattern to `str(value)`.Nick Pope
2020-04-30Removed unused __str__() methods in tests models.Mariusz Felisiak
Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
2020-04-06Fixed #31420 -- Fixed crash when filtering subquery annotation against a ↵Hasan Ramezani
SimpleLazyObject. Thanks Simon Charette for the solution and analysis.
2019-08-29Fixed #25367 -- Allowed boolean expressions in QuerySet.filter() and exclude().Matthew Schinckel
This allows using expressions that have an output_field that is a BooleanField to be used directly in a queryset filters, or in the When() clauses of a Case() expression. Thanks Josh Smeaton, Tim Graham, Simon Charette, Mariusz Felisiak, and Adam Johnson for reviews. Co-Authored-By: NyanKiyoshi <hello@vanille.bid>
2019-01-16Fixed #30044 -- Raised a FieldError on inherited field update attempts.Simon Charette
2018-03-16Fixed hanging indentation in various code.Mariusz Felisiak
2017-10-25Fixed #28689 -- Fixed unquoted table names in Subquery SQL when using OuterRef.Mariusz Felisiak
Regression in f48bc7c3dbd204eefb3c19016b1e4906ac26bee3.
2017-05-30Fixed #28199 -- Fixed Subquery generating unnecessary/invalid CAST.Tim Graham
Thanks Simon Charette for the fix.
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-09-09Refs #25415 -- Fixed invalid models in the test suite.Adam Chainz
2016-08-19Fixed #22288 -- Fixed F() expressions with the __range lookup.Matthew Wilkes
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-03-09Fixed #24171 -- Fixed failure with complex aggregate query and expressionsAnssi Kääriäinen
The query used a construct of qs.annotate().values().aggregate() where the first annotate used an F-object reference and the values() and aggregate() calls referenced that F-object. Also made sure the inner query's select clause is as simple as possible, and made sure .values().distinct().aggreate() works correctly.
2015-01-12Fixed #24031 -- Added CASE expressions to the ORM.Michał Modzelewski
2014-12-20Fixed #2443 -- Added DurationField.Marc Tamlyn
A field for storing periods of time - modeled in Python by timedelta. It is stored in the native interval data type on PostgreSQL and as a bigint of microseconds on other backends. Also includes significant changes to the internals of time related maths in expressions, including the removal of DateModifierNode. Thanks to Tim and Josh in particular for reviews.
2014-04-21Consolidated expressions tests.Aymeric Augustin
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner