Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #8788: fixed a few typoes in [8805]. Thanks, Matthew Flanagan a…

…nd mir.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f6a3652eb23b54948d3386231fb9781031092eb0 1 parent 7a9b55d
Jacob Kaplan-Moss authored September 02, 2008
4  django/forms/models.py
@@ -230,7 +230,7 @@ def validate_unique(self):
230 230
             except FieldDoesNotExist:
231 231
                 # This is an extra field that's not on the ModelForm, ignore it
232 232
                 continue
233  
-            # MySQL can't handle ... WHERE pk IS NULL, so make sure we don't 
  233
+            # MySQL can't handle ... WHERE pk IS NULL, so make sure we
234 234
             # don't generate queries of that form.
235 235
             is_null_pk = f.primary_key and self.cleaned_data[name] is None
236 236
             if name in self.cleaned_data and f.unique and not is_null_pk:
@@ -254,7 +254,7 @@ def validate_unique(self):
254 254
             if self.instance.pk is not None:
255 255
                 qs = qs.exclude(pk=self.instance.pk)
256 256
                 
257  
-            # This cute trick with extra/values is the most efficiant way to
  257
+            # This cute trick with extra/values is the most efficient way to
258 258
             # tell if a particular query returns any results.
259 259
             if qs.extra(select={'a': 1}).values('a').order_by():
260 260
                 model_name = capfirst(self.instance._meta.verbose_name)
8  docs/topics/forms/modelforms.txt
@@ -337,11 +337,11 @@ parameter when declaring the form field::
337 337
 Overriding the clean() method
338 338
 -----------------------------
339 339
 
340  
-You can overide the ``clean()`` method on a model form to provide additional
341  
-validation in the same way you can on a normal form.  However, by default the
  340
+You can override the ``clean()`` method on a model form to provide additional
  341
+validation in the same way you can on a normal form. However, by default the
342 342
 ``clean()`` method validates the uniqueness of fields that are marked as unique
343  
-on the model, and those marked as unque_together, if you would like to overide
344  
-the ``clean()`` method and maintain the default validation you must call the
  343
+or unique_together on the model. Therefore, if you would like to override
  344
+the ``clean()`` method and maintain the default validation, you must call the
345 345
 parent class's ``clean()`` method.
346 346
 
347 347
 Form inheritance

0 notes on commit f6a3652

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