summaryrefslogtreecommitdiff
path: root/docs/howto/custom-model-fields.txt
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:35:52 +0000
commit32d4db66b999cde6776d4be7f71528dab94916cc (patch)
treec952a37b99695ebaebb868db7647849e3eff5b8b /docs/howto/custom-model-fields.txt
parent4755f8fc25331c739a6f932cc8aba0cc9e62e352 (diff)
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.
Diffstat (limited to 'docs/howto/custom-model-fields.txt')
-rw-r--r--docs/howto/custom-model-fields.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt
index 5c41d92bb6..35dfd4cb79 100644
--- a/docs/howto/custom-model-fields.txt
+++ b/docs/howto/custom-model-fields.txt
@@ -477,7 +477,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)