summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2015-02-20 10:53:59 +0000
committerMarc Tamlyn <marc.tamlyn@gmail.com>2015-02-20 11:47:48 +0000
commit3886338c1d6b79cdaf15c33459373185f8159dcd (patch)
tree3300c0c635b45cf761228e48dea137cf89cb5fa9 /docs
parentc54d73ae01cd787315ba030da17e266c49f386b3 (diff)
[1.8.x] Update converters to take a consistent set of parameters.
As suggested by Anssi. This has the slightly strange side effect of passing the expression to Expression.convert_value has the expression passed back to it, but it allows more complex patterns of expressions. Backport of 32d4db66b9 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/howto/custom-model-fields.txt2
-rw-r--r--docs/ref/models/expressions.txt2
-rw-r--r--docs/ref/models/fields.txt2
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt
index f35cc41d3d..d62706ca3a 100644
--- a/docs/howto/custom-model-fields.txt
+++ b/docs/howto/custom-model-fields.txt
@@ -483,7 +483,7 @@ instances::
class HandField(models.Field):
# ...
- def from_db_value(self, value, connection, context):
+ def from_db_value(self, value, expression, connection, context):
if value is None:
return value
return parse_hand(value)
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index f170af8510..0224a21e54 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -416,7 +416,7 @@ calling the appropriate methods on the wrapped expression.
clone.expression = self.expression.relabeled_clone(change_map)
return clone
- .. method:: convert_value(self, value, connection, context)
+ .. method:: convert_value(self, value, expression, connection, context)
A hook allowing the expression to coerce ``value`` into a more
appropriate type.
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index ee82c315a1..8702987630 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -1679,7 +1679,7 @@ Field API reference
When loading data, :meth:`from_db_value` is used:
- .. method:: from_db_value(value, connection, context)
+ .. method:: from_db_value(value, expression, connection, context)
.. versionadded:: 1.8