diff --git a/docs/ref/models/lookups.txt b/docs/ref/models/lookups.txt index ef331aa0ab..d3f64c07a9 100644 --- a/docs/ref/models/lookups.txt +++ b/docs/ref/models/lookups.txt @@ -15,7 +15,7 @@ the ``WHERE`` clause of a database query. To learn how to *use* lookups, see :doc:`/howto/custom-lookups`. The lookup API has two components: a :class:`~lookups.RegisterLookupMixin` class -that registers lookups, and the `Query Expression API `_, a +that registers lookups, and the :ref:`Query Expression API `, a set of methods that a class has to implement to be registrable as a lookup. Django has two base classes that follow the query expression API and from where @@ -65,8 +65,8 @@ register lookups on itself. The two prominent examples are has the registered transform named ``transform_name``, returning the first match. -For a class to be a lookup, it must follow the `Query Expression API -`_. :class:`~Lookup` and :class:`~Transform` naturally +For a class to be a lookup, it must follow the :ref:`Query Expression API +`. :class:`~Lookup` and :class:`~Transform` naturally follow this API. .. _query-expression: @@ -126,13 +126,13 @@ Transform reference The notation to use a ``Transform`` in an lookup expression is ``__`` (e.g. ``date__year``). - This class follows the `Query Expression API `_, which + This class follows the :ref:`Query Expression API `, which implies that you can use ``____``. .. attribute:: lhs The left-hand side - what is being transformed. It must follow the - `Query Expression API `_. + :ref:`Query Expression API `. .. attribute:: lookup_name @@ -171,14 +171,14 @@ Lookup reference The notation to use a lookup in an expression is ``__=``. - This class doesn't follow the `Query Expression API `_ + This class doesn't follow the :ref:`Query Expression API ` since it has ``=`` on its construction: lookups are always the end of a lookup expression. .. attribute:: lhs The left-hand side - what is being looked up. The object must follow - the `Query Expression API `_. + the :ref:`Query Expression API `. .. attribute:: rhs