From 740feb48017e92d1edc11e2d9eba5cf8b9eea3af Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 8 Dec 2015 18:31:55 +0000 Subject: [PATCH] [1.9.x] Fixed #25893 -- Corrected custom lookups example. Backport of ffcdb0b471d0afc72b42b0a2b0c0c4fb45d7b6b1 from master --- docs/howto/custom-lookups.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/howto/custom-lookups.txt b/docs/howto/custom-lookups.txt index f398618e39..a795326c21 100644 --- a/docs/howto/custom-lookups.txt +++ b/docs/howto/custom-lookups.txt @@ -194,10 +194,10 @@ The implementation is:: There are a couple of notable things going on. First, ``AbsoluteValueLessThan`` isn't calling ``process_lhs()``. Instead it skips the transformation of the ``lhs`` done by ``AbsoluteValue`` and uses the original ``lhs``. That is, we -want to get ``27`` not ``ABS(27)``. Referring directly to ``self.lhs.lhs`` is -safe as ``AbsoluteValueLessThan`` can be accessed only from the -``AbsoluteValue`` lookup, that is the ``lhs`` is always an instance of -``AbsoluteValue``. +want to get ``"experiments"."change"`` not ``ABS("experiments"."change")``. +Referring directly to ``self.lhs.lhs`` is safe as ``AbsoluteValueLessThan`` +can be accessed only from the ``AbsoluteValue`` lookup, that is the ``lhs`` +is always an instance of ``AbsoluteValue``. Notice also that as both sides are used multiple times in the query the params need to contain ``lhs_params`` and ``rhs_params`` multiple times.