summaryrefslogtreecommitdiff
path: root/tests/from_db_value
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2014-12-01 09:28:01 +0200
committerTim Graham <timograham@gmail.com>2015-01-08 14:07:54 -0500
commit0c7633178fa9410f102e4708cef979b873bccb76 (patch)
treecd46a196f4066f5759623ccb1ede096c5806a414 /tests/from_db_value
parentb8abfe141be17f20079f55b921dcaf7abe116c4b (diff)
Fixed #24020 -- Refactored SQL compiler to use expressions
Refactored compiler SELECT, GROUP BY and ORDER BY generation. While there, also refactored select_related() implementation (get_cached_row() and get_klass_info() are now gone!). Made get_db_converters() method work on expressions instead of internal_type. This allows the backend converters to target specific expressions if need be. Added query.context, this can be used to set per-query state. Also changed the signature of database converters. They now accept context as an argument.
Diffstat (limited to 'tests/from_db_value')
-rw-r--r--tests/from_db_value/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/from_db_value/models.py b/tests/from_db_value/models.py
index 4cc9e62168..6a06c832ea 100644
--- a/tests/from_db_value/models.py
+++ b/tests/from_db_value/models.py
@@ -18,7 +18,7 @@ class CashField(models.DecimalField):
kwargs['decimal_places'] = 2
super(CashField, self).__init__(**kwargs)
- def from_db_value(self, value, connection):
+ def from_db_value(self, value, connection, context):
cash = Cash(value)
cash.vendor = connection.vendor
return cash