mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
[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
This commit is contained in:
parent
c54d73ae01
commit
3886338c1d
19 changed files with 44 additions and 46 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue