Ticket #8788: typos.diff

File typos.diff, 1.6 KB (added by Matthew Flanagan <mattimustang@…>, 7 years ago)

"proper" patch

  • django/forms/models.py

     
    244244            if self.instance.pk is not None:
    245245                qs = qs.exclude(pk=self.instance.pk)
    246246
    247             # This cute trick with extra/values is the most efficiant way to
     247            # This cute trick with extra/values is the most efficient way to
    248248            # tell if a particular query returns any results.
    249249            if qs.extra(select={'a': 1}).values('a').order_by():
    250250                model_name = capfirst(self.instance._meta.verbose_name)
  • docs/topics/forms/modelforms.txt

     
    337337Overriding the clean() method
    338338-----------------------------
    339339
    340 You can overide the ``clean()`` method on a model form to provide additional
     340You can override the ``clean()`` method on a model form to provide additional
    341341validation in the same way you can on a normal form.  However, by default the
    342342``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
     343on the model, and those marked as unique_together, if you would like to override
    344344the ``clean()`` method and maintain the default validation you must call the
    345345parent class's ``clean()`` method.
    346346
Back to Top