1
0
mirror of https://github.com/django/django.git synced 2025-10-30 17:16:10 +00:00

Fixed many spelling mistakes in code, comments, and docs.

This commit is contained in:
Josh Soref
2015-12-02 23:55:50 +00:00
committed by Tim Graham
parent b6dd0afead
commit 93452a70e8
61 changed files with 187 additions and 187 deletions

View File

@@ -16,7 +16,7 @@ def delete_selected(modeladmin, request, queryset):
"""
Default action which deletes the selected objects.
This action first displays a confirmation page whichs shows all the
This action first displays a confirmation page which shows all the
deleteable objects, or, if the user has no permission one of the related
childs (foreignkeys), a "permission denied" message.

View File

@@ -13,7 +13,7 @@ class PermLookupDict(object):
return self.user.has_perm("%s.%s" % (self.app_label, perm_name))
def __iter__(self):
# To fix 'item in perms.someapp' and __getitem__ iteraction we need to
# To fix 'item in perms.someapp' and __getitem__ interaction we need to
# define __iter__. See #18979 for details.
raise TypeError("PermLookupDict is not iterable.")

View File

@@ -51,7 +51,7 @@ class PostGISGeometryColumns(models.Model):
class PostGISSpatialRefSys(models.Model, SpatialRefSysMixin):
"""
The 'spatial_ref_sys' table from PostGIS. See the PostGIS
documentaiton at Ch. 4.2.1.
documentation at Ch. 4.2.1.
"""
srid = models.IntegerField(primary_key=True)
auth_name = models.CharField(max_length=256)

View File

@@ -406,7 +406,7 @@ class GeoQuerySet(QuerySet):
SQL function to call.
settings:
Dictonary of internal settings to customize for the spatial procedure.
Dictionary of internal settings to customize for the spatial procedure.
Public Keyword Arguments:

View File

@@ -3,7 +3,7 @@ from django.utils import six
class OGRGeomType(object):
"Encapulates OGR Geometry Types."
"Encapsulates OGR Geometry Types."
wkb25bit = -2147483648

View File

@@ -78,7 +78,7 @@ to_hex = BinOutput('GEOSGeomToHEX_buf')
to_wkb = BinOutput('GEOSGeomToWKB_buf')
to_wkt = StringFromGeom('GEOSGeomToWKT')
# The GEOS geometry type, typeid, num_coordites and number of geometries
# The GEOS geometry type, typeid, num_coordinates and number of geometries
geos_normalize = IntFromGeom('GEOSNormalize')
geos_type = StringFromGeom('GEOSGeomType')
geos_typeid = IntFromGeom('GEOSGeomTypeId')

View File

@@ -7,7 +7,7 @@ from django.contrib.gis.geos.prototypes.errcheck import check_predicate
# Prepared geometry constructor and destructors.
geos_prepare = GEOSFuncFactory('GEOSPrepare', argtypes=[GEOM_PTR], restype=PREPGEOM_PTR)
prepared_destroy = GEOSFuncFactory('GEOSPreparedGeom_destroy', argtpes=[PREPGEOM_PTR])
prepared_destroy = GEOSFuncFactory('GEOSPreparedGeom_destroy', argtypes=[PREPGEOM_PTR])
# Prepared geometry binary predicate support.

View File

@@ -44,7 +44,7 @@ class KMLSitemap(Sitemap):
def get_urls(self, page=1, site=None, protocol=None):
"""
This method is overrridden so the appropriate `geo_format` attribute
This method is overridden so the appropriate `geo_format` attribute
is placed on each URL element.
"""
urls = Sitemap.get_urls(self, page=page, site=site, protocol=protocol)

View File

@@ -40,7 +40,7 @@ class Command(BaseCommand):
yield "# You'll have to do the following manually to clean this up:"
yield "# * Rearrange models' order"
yield "# * Make sure each model has one field with primary_key=True"
yield "# * Make sure each ForeignKey has `on_delete` set to the desidered behavior."
yield "# * Make sure each ForeignKey has `on_delete` set to the desired behavior."
yield (
"# * Remove `managed = False` lines if you wish to allow "
"Django to create, modify, and delete the table"

View File

@@ -309,7 +309,7 @@ class BaseExpression(object):
Does this expression contain a reference to some of the
existing aggregates? If so, returns the aggregate and also
the lookup parts that *weren't* found. So, if
exsiting_aggregates = {'max_id': Max('id')}
existing_aggregates = {'max_id': Max('id')}
self.name = 'max_id'
queryset.filter(max_id__range=[10,100])
then this method will return Max('id') and those parts of the

View File

@@ -354,9 +354,9 @@ class Token(object):
for bit in bits:
# Handle translation-marked template pieces
if bit.startswith(('_("', "_('")):
sentinal = bit[2] + ')'
sentinel = bit[2] + ')'
trans_bit = [bit]
while not bit.endswith(sentinal):
while not bit.endswith(sentinel):
bit = next(bits)
trans_bit.append(bit)
bit = ' '.join(trans_bit)

View File

@@ -797,7 +797,7 @@ def default_if_none(value, arg):
@register.filter(is_safe=False)
def divisibleby(value, arg):
"""Returns True if the value is devisible by the argument."""
"""Returns True if the value is divisible by the argument."""
return int(value) % int(arg) == 0

View File

@@ -764,7 +764,7 @@ def do_for(parser, token):
than -- the following::
<ul>
{% if althete_list %}
{% if athlete_list %}
{% for athlete in athlete_list %}
<li>{{ athlete.name }}</li>
{% endfor %}

View File

@@ -84,7 +84,7 @@ class RemoteTestResult(object):
def test_index(self):
return self.testsRun - 1
def check_pickleable(self, test, err):
def check_picklable(self, test, err):
# Ensure that sys.exc_info() tuples are picklable. This displays a
# clear multiprocessing.pool.RemoteTraceback generated in the child
# process instead of a multiprocessing.pool.MaybeEncodingError, making
@@ -152,12 +152,12 @@ failure and get a correct traceback.
self.events.append(('stopTest', self.test_index))
def addError(self, test, err):
self.check_pickleable(test, err)
self.check_picklable(test, err)
self.events.append(('addError', self.test_index, err))
self.stop_if_failfast()
def addFailure(self, test, err):
self.check_pickleable(test, err)
self.check_picklable(test, err)
self.events.append(('addFailure', self.test_index, err))
self.stop_if_failfast()
@@ -177,7 +177,7 @@ failure and get a correct traceback.
# expected failure occurs.
if tblib is None:
err = err[0], err[1], None
self.check_pickleable(test, err)
self.check_picklable(test, err)
self.events.append(('addExpectedFailure', self.test_index, err))
def addUnexpectedSuccess(self, test):
@@ -299,7 +299,7 @@ class ParallelTestSuite(unittest.TestSuite):
To minimize pickling errors when getting results from workers:
- pass back numeric indexes in self.subsuites instead of tests
- make tracebacks pickleable with tblib, if available
- make tracebacks picklable with tblib, if available
Even with tblib, errors may still occur for dynamically created
exception classes such Model.DoesNotExist which cannot be unpickled.