1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #16731 -- Made pattern lookups work properly with F() expressions

This commit is contained in:
Thomas Chaumeny
2014-09-27 12:41:54 +02:00
committed by Anssi Kääriäinen
parent f39b0421b4
commit 6b5d82749c
8 changed files with 163 additions and 19 deletions

View File

@@ -382,6 +382,12 @@ Models
are applied to both ``lhs`` and ``rhs`` when used in a lookup expression,
providing opportunities for more sophisticated lookups.
* SQL special characters (\, %, _) are now escaped properly when a pattern
lookup (e.g. ``contains``, ``startswith``, etc.) is used with an ``F()``
expression as the right-hand side. In those cases, the escaping is performed
by the database, which can lead to somewhat complex queries involving nested
``REPLACE`` function calls.
Signals
^^^^^^^