diff --git a/docs/ref/models/custom_lookups.txt b/docs/ref/models/custom_lookups.txt index 6912ca6496..aee70c5c77 100644 --- a/docs/ref/models/custom_lookups.txt +++ b/docs/ref/models/custom_lookups.txt @@ -180,6 +180,7 @@ as_mysql() method and registering the subclass over the original class:: Field.register_lookup(MySQLNotExact) The alternate is to monkey-patch the existing class in place:: + def as_mysql(self, qn, connection): lhs, lhs_params = self.process_lhs(qn, connection) rhs, rhs_params = self.process_rhs(qn, connection) diff --git a/docs/ref/models/index.txt b/docs/ref/models/index.txt index c61bb35a5f..5d67827fe7 100644 --- a/docs/ref/models/index.txt +++ b/docs/ref/models/index.txt @@ -13,3 +13,4 @@ Model API reference. For introductory material, see :doc:`/topics/db/models`. instances querysets queries + custom_lookups