Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed typos spotted by Claude Paroz

  • Loading branch information...
commit 4dc3be250662b4132d8475fb02983a6d8f1eec23 1 parent f468662
@akaariai akaariai authored
Showing with 7 additions and 7 deletions.
  1. +6 −6 docs/ref/models/custom-lookups.txt
  2. +1 −1  docs/releases/1.7.txt
12 docs/ref/models/custom-lookups.txt
@@ -88,7 +88,7 @@ application where we want to make use of the ``abs()`` operator.
We have an ``Experiment`` model which records a start value, end value and the
change (start - end). We would like to find all experiments where the change
was equal to a certain amount (``Experiment.objects.filter(change__abs=27)``),
-or where it did not exceede a certain amount
+or where it did not exceed a certain amount
.. note::
@@ -113,7 +113,7 @@ Next, lets register it for ``IntegerField``::
from django.db.models import IntegerField
-We can now run the queris we had before.
+We can now run the queries we had before.
``Experiment.objects.filter(change__abs=27)`` will generate the following SQL::
SELECT ... WHERE ABS("experiments"."change") = 27
@@ -184,13 +184,13 @@ transformations in Python.
.. note::
In fact, most lookups with ``__abs`` could be implemented as range queries
- like this, and on most database backend it is likely to be more sensible to
+ like this, and on most database backends it is likely to be more sensible to
do so as you can make use of the indexes. However with PostgreSQL you may
want to add an index on ``abs(change)`` which would allow these queries to
be very efficient.
-Writing alternative implemenatations for existing lookups
+Writing alternative implementations for existing lookups
Sometimes different database vendors require different SQL for the same
operation. For this example we will rewrite a custom implementation for
@@ -210,7 +210,7 @@ We can change the behaviour on a specific backend by creating a subclass of
We can then register it with ``Field``. It takes the place of the original
-``NotEqual`` class as it has
+``NotEqual`` class as it has the same ``lookup_name``.
When compiling a query, Django first looks for ``as_%s % connection.vendor``
methods, and then falls back to ``as_sql``. The vendor names for the in-built
2  docs/releases/1.7.txt
@@ -189,7 +189,7 @@ Custom lookups work just like Django's inbuilt lookups (e.g. ``lte``,
The :class:`django.db.models.Lookup` class provides a way to add lookup
operators for model fields. As an example it is possible to add ``day_lte``
-opertor for ``DateFields``.
+operator for ``DateFields``.
The :class:`django.db.models.Transform` class allows transformations of
database values prior to the final lookup. For example it is possible to

0 comments on commit 4dc3be2

Please sign in to comment.
Something went wrong with that request. Please try again.