Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed typos spotted by Claude Paroz

  • Loading branch information...
commit 4dc3be250662b4132d8475fb02983a6d8f1eec23 1 parent f468662
Anssi Kääriäinen authored
12  docs/ref/models/custom-lookups.txt
@@ -88,7 +88,7 @@ application where we want to make use of the ``abs()`` operator.
88 88
 We have an ``Experiment`` model which records a start value, end value and the
89 89
 change (start - end). We would like to find all experiments where the change
90 90
 was equal to a certain amount (``Experiment.objects.filter(change__abs=27)``),
91  
-or where it did not exceede a certain amount
  91
+or where it did not exceed a certain amount
92 92
 (``Experiment.objects.filter(change__abs__lt=27)``).
93 93
 
94 94
 .. note::
@@ -113,7 +113,7 @@ Next, lets register it for ``IntegerField``::
113 113
   from django.db.models import IntegerField
114 114
   IntegerField.register_lookup(AbsoluteValue)
115 115
 
116  
-We can now run the queris we had before.
  116
+We can now run the queries we had before.
117 117
 ``Experiment.objects.filter(change__abs=27)`` will generate the following SQL::
118 118
 
119 119
     SELECT ... WHERE ABS("experiments"."change") = 27
@@ -184,13 +184,13 @@ transformations in Python.
184 184
 
185 185
 .. note::
186 186
     In fact, most lookups with ``__abs`` could be implemented as range queries
187  
-    like this, and on most database backend it is likely to be more sensible to
  187
+    like this, and on most database backends it is likely to be more sensible to
188 188
     do so as you can make use of the indexes. However with PostgreSQL you may
189 189
     want to add an index on ``abs(change)`` which would allow these queries to
190 190
     be very efficient.
191 191
 
192  
-Writing alternative implemenatations for existing lookups
193  
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  192
+Writing alternative implementations for existing lookups
  193
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
194 194
 
195 195
 Sometimes different database vendors require different SQL for the same
196 196
 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
210 210
   Field.register_lookup(MySQLNotExact)
211 211
 
212 212
 We can then register it with ``Field``. It takes the place of the original
213  
-``NotEqual`` class as it has 
  213
+``NotEqual`` class as it has the same ``lookup_name``.
214 214
 
215 215
 When compiling a query, Django first looks for ``as_%s % connection.vendor``
216 216
 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``,
189 189
 
190 190
 The :class:`django.db.models.Lookup` class provides a way to add lookup
191 191
 operators for model fields. As an example it is possible to add ``day_lte``
192  
-opertor for ``DateFields``.
  192
+operator for ``DateFields``.
193 193
 
194 194
 The :class:`django.db.models.Transform` class allows transformations of
195 195
 database values prior to the final lookup. For example it is possible to

0 notes on commit 4dc3be2

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