1. Luke Plant
  2. django

Commits

Al...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed b1f8d31

[soc2009/multidb] Added versionadded tags to custom model field docs. Patch from Russell Keith-Magee.

  • Participants
  • Parent commits 063f8dd
  • Branches soc2009/multidb

Comments (0)

Files changed (1)

File docs/howto/custom-model-fields.txt

View file
 
 .. method:: db_type(self, connection)
 
+.. versionadded:: 1.2
+   The ``connection`` argument was added to support multiple databases.
+
 Returns the database column data type for the :class:`~django.db.models.Field`,
 taking into account the connection object, and the settings associated with it.
 
 
 .. method:: get_prep_value(self, value)
 
+.. versionadded:: 1.2
+   This method was factored out of ``get_db_prep_value()``
+
 This is the reverse of :meth:`to_python` when working with the
 database backends (as opposed to serialization). The ``value``
 parameter is the current value of the model's attribute (a field has
 
 .. method:: get_db_prep_value(self, value, connection, prepared=False)
 
+.. versionadded:: 1.2
+   The ``connection`` and ``prepared arguments were added to support multiple databases.
+
 Some data types (for example, dates) need to be in a specific format
 before they can be used by a database backend.
 :meth:`get_db_prep_value` is the method where those conversions should
 
 .. method:: get_db_prep_save(self, value, connection)
 
+.. versionadded:: 1.2
+   The ``connection`` argument was added to support multiple databases.
+
 Same as the above, but called when the Field value must be *saved* to
 the database. As the default implementation just calls
 ``get_db_prep_value``, you shouldn't need to implement this method
 
 .. method:: get_prep_lookup(self, lookup_type, value)
 
+.. versionadded:: 1.2
+   This method was factored out of ``get_db_prep_lookup()``
+
 :meth:`get_prep_lookup` performs the first phase of lookup preparation,
 performing generic data validity checks
 
 
 .. method:: get_db_prep_lookup(self, lookup_type, value, connection, prepared=False)
 
+.. versionadded:: 1.2
+   The ``connection`` and ``prepared`` arguments were added to support multiple databases.
+
 Performs any database-specific data conversions required by a lookup.
 As with :meth:`get_db_prep_value`, the specific connection that will
 be used for the query is passed as the ``connection`` parameter.