Loading docs/releases/1.2.txt +19 −14 Original line number Diff line number Diff line Loading @@ -435,6 +435,8 @@ database-compatible values. A custom field might look something like:: class CustomModelField(models.Field): # ... def db_type(self): # ... def get_db_prep_save(self, value): # ... Loading @@ -451,6 +453,9 @@ two extra methods have been introduced:: class CustomModelField(models.Field): # ... def db_type(self, connection): # ... def get_prep_value(self, value): # ... Loading @@ -467,10 +472,10 @@ two extra methods have been introduced:: # ... These changes are required to support multiple databases -- ``get_db_prep_*`` can no longer make any assumptions regarding the database for which it is preparing. The ``connection`` argument now provides the preparation methods with the specific connection for which the value is being prepared. ``db_type`` and ``get_db_prep_*`` can no longer make any assumptions regarding the database for which it is preparing. The ``connection`` argument now provides the preparation methods with the specific connection for which the value is being prepared. The two new methods exist to differentiate general data-preparation requirements from requirements that are database-specific. The Loading Loading
docs/releases/1.2.txt +19 −14 Original line number Diff line number Diff line Loading @@ -435,6 +435,8 @@ database-compatible values. A custom field might look something like:: class CustomModelField(models.Field): # ... def db_type(self): # ... def get_db_prep_save(self, value): # ... Loading @@ -451,6 +453,9 @@ two extra methods have been introduced:: class CustomModelField(models.Field): # ... def db_type(self, connection): # ... def get_prep_value(self, value): # ... Loading @@ -467,10 +472,10 @@ two extra methods have been introduced:: # ... These changes are required to support multiple databases -- ``get_db_prep_*`` can no longer make any assumptions regarding the database for which it is preparing. The ``connection`` argument now provides the preparation methods with the specific connection for which the value is being prepared. ``db_type`` and ``get_db_prep_*`` can no longer make any assumptions regarding the database for which it is preparing. The ``connection`` argument now provides the preparation methods with the specific connection for which the value is being prepared. The two new methods exist to differentiate general data-preparation requirements from requirements that are database-specific. The Loading