summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-03-03 19:34:31 -0500
committerTim Graham <timograham@gmail.com>2016-03-03 19:38:03 -0500
commit377ca697a133e6063be3dff09b83b1c533d91950 (patch)
tree73ffbb4cee226ebb32f9c612b02c375e79811b43 /docs/ref
parentc6d39c644d7ed990aef30b41c9fd5569f200089c (diff)
[1.9.x] Fixed #26321 -- Added missing "for_save" parameter in expressions example.
Thanks tomaszn for the patch. Backport of de8a11ba18d5902c668d4db47c38c9c6bdf9c1da from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/expressions.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index a580ca426e..223c0f6460 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -460,7 +460,7 @@ calling the appropriate methods on the wrapped expression.
Tells Django that this expression contains an aggregate and that a
``GROUP BY`` clause needs to be added to the query.
- .. method:: resolve_expression(query=None, allow_joins=True, reuse=None, summarize=False)
+ .. method:: resolve_expression(query=None, allow_joins=True, reuse=None, summarize=False, for_save=False)
Provides the chance to do any pre-processing or validation of
the expression before it's added to the query. ``resolve_expression()``
@@ -591,11 +591,11 @@ Now we implement the pre-processing and validation. Since we do not have
any of our own validation at this point, we just delegate to the nested
expressions::
- def resolve_expression(self, query=None, allow_joins=True, reuse=None, summarize=False):
+ def resolve_expression(self, query=None, allow_joins=True, reuse=None, summarize=False, for_save=False):
c = self.copy()
c.is_summary = summarize
for pos, expression in enumerate(self.expressions):
- c.expressions[pos] = expression.resolve_expression(query, allow_joins, reuse, summarize)
+ c.expressions[pos] = expression.resolve_expression(query, allow_joins, reuse, summarize, for_save)
return c
Next, we write the method responsible for generating the SQL::