diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py index 56b8b66023..cd18868ddc 100644 --- a/django/contrib/admin/tests.py +++ b/django/contrib/admin/tests.py @@ -54,7 +54,7 @@ class AdminSeleniumWebDriverTestCase(StaticLiveServerCase): def wait_for(self, css_selector, timeout=10): """ - Helper function that blocks until an css selector is found on the page. + Helper function that blocks until a CSS selector is found on the page. """ from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ec @@ -65,7 +65,7 @@ class AdminSeleniumWebDriverTestCase(StaticLiveServerCase): def wait_for_text(self, css_selector, text, timeout=10): """ - Helper function that blocks until the text is found in the css selector. + Helper function that blocks until the text is found in the CSS selector. """ from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ec @@ -77,7 +77,7 @@ class AdminSeleniumWebDriverTestCase(StaticLiveServerCase): def wait_for_value(self, css_selector, text, timeout=10): """ - Helper function that blocks until the value is found in the css selector. + Helper function that blocks until the value is found in the CSS selector. """ from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ec @@ -96,7 +96,7 @@ class AdminSeleniumWebDriverTestCase(StaticLiveServerCase): # Wait for the next page to be loaded self.wait_loaded_tag('body') except TimeoutException: - # IE7 occasionnally returns an error "Internet Explorer cannot + # IE7 occasionally returns an error "Internet Explorer cannot # display the webpage" and doesn't load the next page. We just # ignore it. pass diff --git a/django/contrib/admin/utils.py b/django/contrib/admin/utils.py index d614e44cb8..91a7eb248c 100644 --- a/django/contrib/admin/utils.py +++ b/django/contrib/admin/utils.py @@ -108,7 +108,7 @@ def flatten_fieldsets(fieldsets): def get_deleted_objects(objs, opts, user, admin_site, using): """ Find all objects related to ``objs`` that should also be deleted. ``objs`` - must be a homogenous iterable of objects (e.g. a QuerySet). + must be a homogeneous iterable of objects (e.g. a QuerySet). Returns a nested list of strings suitable for display in the template with the ``unordered_list`` filter. diff --git a/django/contrib/auth/decorators.py b/django/contrib/auth/decorators.py index 6a976b48dc..12a79c0918 100644 --- a/django/contrib/auth/decorators.py +++ b/django/contrib/auth/decorators.py @@ -56,7 +56,7 @@ def login_required(function=None, redirect_field_name=REDIRECT_FIELD_NAME, login def permission_required(perm, login_url=None, raise_exception=False): """ Decorator for views that checks whether a user has a particular permission - enabled, redirecting to the log-in page if neccesary. + enabled, redirecting to the log-in page if necessary. If the raise_exception parameter is given the PermissionDenied exception is raised. """ diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py index 992e19e2a4..4e40a7c2ba 100644 --- a/django/contrib/auth/hashers.py +++ b/django/contrib/auth/hashers.py @@ -186,7 +186,7 @@ class BasePasswordHasher(object): def salt(self): """ - Generates a cryptographically secure nonce salt in ascii + Generates a cryptographically secure nonce salt in ASCII """ return get_random_string() diff --git a/django/contrib/auth/tests/test_management.py b/django/contrib/auth/tests/test_management.py index f0dc66baa3..c78142722f 100644 --- a/django/contrib/auth/tests/test_management.py +++ b/django/contrib/auth/tests/test_management.py @@ -39,7 +39,7 @@ def mock_inputs(inputs): def mock_input(prompt): # prompt should be encoded in Python 2. This line will raise an - # Exception if prompt contains unencoded non-ascii on Python 2. + # Exception if prompt contains unencoded non-ASCII on Python 2. prompt = str(prompt) assert str('__proxy__') not in prompt response = '' diff --git a/django/contrib/comments/views/moderation.py b/django/contrib/comments/views/moderation.py index 24ba42fb04..3bf70f321c 100644 --- a/django/contrib/comments/views/moderation.py +++ b/django/contrib/comments/views/moderation.py @@ -90,7 +90,7 @@ def approve(request, comment_id, next=None): template.RequestContext(request) ) -# The following functions actually perform the various flag/aprove/delete +# The following functions actually perform the various flag/approve/delete # actions. They've been broken out into separate functions to that they # may be called from admin actions. diff --git a/django/contrib/flatpages/tests/test_csrf.py b/django/contrib/flatpages/tests/test_csrf.py index 23c03a1e13..9ec12a7695 100644 --- a/django/contrib/flatpages/tests/test_csrf.py +++ b/django/contrib/flatpages/tests/test_csrf.py @@ -51,13 +51,13 @@ class FlatpageCSRFTests(TestCase): self.assertContains(response, "

Isn't it sekrit!

") def test_fallback_flatpage(self): - "A flatpage can be served by the fallback middlware" + "A flatpage can be served by the fallback middleware" response = self.client.get('/flatpage/') self.assertEqual(response.status_code, 200) self.assertContains(response, "

Isn't it flat!

") def test_fallback_non_existent_flatpage(self): - "A non-existent flatpage raises a 404 when served by the fallback middlware" + "A non-existent flatpage raises a 404 when served by the fallback middleware" response = self.client.get('/no_such_flatpage/') self.assertEqual(response.status_code, 404) diff --git a/django/contrib/flatpages/tests/test_middleware.py b/django/contrib/flatpages/tests/test_middleware.py index 47d29bdb00..6dd1f6b3b3 100644 --- a/django/contrib/flatpages/tests/test_middleware.py +++ b/django/contrib/flatpages/tests/test_middleware.py @@ -48,13 +48,13 @@ class FlatpageMiddlewareTests(TestCase): self.assertContains(response, "

Isn't it sekrit!

") def test_fallback_flatpage(self): - "A flatpage can be served by the fallback middlware" + "A flatpage can be served by the fallback middleware" response = self.client.get('/flatpage/') self.assertEqual(response.status_code, 200) self.assertContains(response, "

Isn't it flat!

") def test_fallback_non_existent_flatpage(self): - "A non-existent flatpage raises a 404 when served by the fallback middlware" + "A non-existent flatpage raises a 404 when served by the fallback middleware" response = self.client.get('/no_such_flatpage/') self.assertEqual(response.status_code, 404) @@ -116,12 +116,12 @@ class FlatpageMiddlewareAppendSlashTests(TestCase): self.assertEqual(response.status_code, 404) def test_redirect_fallback_flatpage(self): - "A flatpage can be served by the fallback middlware and should add a slash" + "A flatpage can be served by the fallback middleware and should add a slash" response = self.client.get('/flatpage') self.assertRedirects(response, '/flatpage/', status_code=301) def test_redirect_fallback_non_existent_flatpage(self): - "A non-existent flatpage raises a 404 when served by the fallback middlware and should not add a slash" + "A non-existent flatpage raises a 404 when served by the fallback middleware and should not add a slash" response = self.client.get('/no_such_flatpage') self.assertEqual(response.status_code, 404) diff --git a/django/contrib/flatpages/tests/test_templatetags.py b/django/contrib/flatpages/tests/test_templatetags.py index 025c73c2cf..25aacf1802 100644 --- a/django/contrib/flatpages/tests/test_templatetags.py +++ b/django/contrib/flatpages/tests/test_templatetags.py @@ -88,7 +88,7 @@ class FlatpageTemplateTagTests(TestCase): @skipIfCustomUser def test_get_flatpages_with_prefix_for_user(self): - "The flatpage template tag retrive prefixed flatpages for an authenticated user" + "The flatpage template tag retrieve prefixed flatpages for an authenticated user" me = User.objects.create_user('testuser', 'test@example.com', 's3krit') out = Template( "{% load flatpages %}" diff --git a/django/contrib/flatpages/tests/test_views.py b/django/contrib/flatpages/tests/test_views.py index d2683fbbf4..6e8b5f4fab 100644 --- a/django/contrib/flatpages/tests/test_views.py +++ b/django/contrib/flatpages/tests/test_views.py @@ -53,7 +53,7 @@ class FlatpageViewTests(TestCase): self.assertEqual(response.status_code, 404) def test_fallback_non_existent_flatpage(self): - "A non-existent flatpage won't be served if the fallback middlware is disabled" + "A non-existent flatpage won't be served if the fallback middleware is disabled" response = self.client.get('/no_such_flatpage/') self.assertEqual(response.status_code, 404) @@ -109,7 +109,7 @@ class FlatpageViewAppendSlashTests(TestCase): self.assertEqual(response.status_code, 404) def test_redirect_fallback_non_existent_flatpage(self): - "A non-existent flatpage won't be served if the fallback middlware is disabled and should not add a slash" + "A non-existent flatpage won't be served if the fallback middleware is disabled and should not add a slash" response = self.client.get('/no_such_flatpage') self.assertEqual(response.status_code, 404) diff --git a/django/contrib/formtools/tests/tests.py b/django/contrib/formtools/tests/tests.py index 59939a1ecd..870f45abb0 100644 --- a/django/contrib/formtools/tests/tests.py +++ b/django/contrib/formtools/tests/tests.py @@ -58,7 +58,7 @@ class PreviewTests(TestCase): """ Test contrib.formtools.preview form retrieval. - Use the client library to see if we can sucessfully retrieve + Use the client library to see if we can successfully retrieve the form (mostly testing the setup ROOT_URLCONF process). Verify that an additional hidden input field is created to manage the stage. diff --git a/django/contrib/formtools/wizard/views.py b/django/contrib/formtools/wizard/views.py index f5cf563ad5..1b297838be 100644 --- a/django/contrib/formtools/wizard/views.py +++ b/django/contrib/formtools/wizard/views.py @@ -368,7 +368,7 @@ class WizardView(TemplateView): def get_form_initial(self, step): """ Returns a dictionary which will be passed to the form for `step` - as `initial`. If no initial data was provied while initializing the + as `initial`. If no initial data was provided while initializing the form wizard, a empty dictionary will be returned. """ return self.initial_dict.get(step, {}) @@ -376,7 +376,7 @@ class WizardView(TemplateView): def get_form_instance(self, step): """ Returns a object which will be passed to the form for `step` - as `instance`. If no instance object was provied while initializing + as `instance`. If no instance object was provided while initializing the form wizard, None will be returned. """ return self.instance_dict.get(step, None) diff --git a/django/contrib/gis/db/backends/base.py b/django/contrib/gis/db/backends/base.py index 4da0af0d27..73300ba997 100644 --- a/django/contrib/gis/db/backends/base.py +++ b/django/contrib/gis/db/backends/base.py @@ -148,7 +148,7 @@ class BaseSpatialOperations(object): class SpatialRefSysMixin(object): """ The SpatialRefSysMixin is a class used by the database-dependent - SpatialRefSys objects to reduce redundnant code. + SpatialRefSys objects to reduce redundant code. """ # For pulling out the spheroid from the spatial reference string. This # regular expression is used only if the user does not have GDAL installed. @@ -304,7 +304,7 @@ class SpatialRefSysMixin(object): def get_units(cls, wkt): """ Class method used by GeometryField on initialization to - retrive the units on the given WKT, without having to use + retrieve the units on the given WKT, without having to use any of the database fields. """ if gdal.HAS_GDAL: diff --git a/django/contrib/gis/db/backends/oracle/operations.py b/django/contrib/gis/db/backends/oracle/operations.py index b3aa191ccc..72ac381612 100644 --- a/django/contrib/gis/db/backends/oracle/operations.py +++ b/django/contrib/gis/db/backends/oracle/operations.py @@ -196,7 +196,7 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations): else: dist_param = value - # dwithin lookups on oracle require a special string parameter + # dwithin lookups on Oracle require a special string parameter # that starts with "distance=". if lookup_type == 'dwithin': dist_param = 'distance=%s' % dist_param @@ -220,7 +220,7 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations): placeholder = '%s(%%s, %s)' % (self.transform, f.srid) else: placeholder = '%s' - # No geometry value used for F expression, substitue in + # No geometry value used for F expression, substitute in # the column name instead. return placeholder % self.get_expression_column(value) else: diff --git a/django/contrib/gis/db/backends/postgis/introspection.py b/django/contrib/gis/db/backends/postgis/introspection.py index 8edc13387d..412014bf44 100644 --- a/django/contrib/gis/db/backends/postgis/introspection.py +++ b/django/contrib/gis/db/backends/postgis/introspection.py @@ -51,7 +51,7 @@ class PostGISIntrospection(DatabaseIntrospection): if not self.postgis_types_reverse: # If the PostGIS types reverse dictionary is not populated, do so # now. In order to prevent unnecessary requests upon connection - # intialization, the `data_types_reverse` dictionary is not updated + # initialization, the `data_types_reverse` dictionary is not updated # with the PostGIS custom types until introspection is actually # performed -- in other words, when this function is called. self.postgis_types_reverse = self.get_postgis_types() diff --git a/django/contrib/gis/db/backends/postgis/operations.py b/django/contrib/gis/db/backends/postgis/operations.py index e8da6a52a6..9cc5b3f683 100644 --- a/django/contrib/gis/db/backends/postgis/operations.py +++ b/django/contrib/gis/db/backends/postgis/operations.py @@ -290,7 +290,7 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations): def convert_extent3d(self, box3d): """ Returns a 6-tuple extent for the `Extent3D` aggregate by converting - the 3d bounding-box text returnded by PostGIS (`box3d` argument), for + the 3d bounding-box text returned by PostGIS (`box3d` argument), for example: "BOX3D(-90.0 30.0 1, -85.0 40.0 2)". """ ll, ur = box3d[6:-1].split(',') @@ -342,7 +342,7 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations): This is the most complex implementation of the spatial backends due to what is supported on geodetic geometry columns vs. what's available on projected geometry columns. In addition, it has to take into account - the newly introduced geography column type introudced in PostGIS 1.5. + the geography column type newly introduced in PostGIS 1.5. """ # Getting the distance parameter and any options. if len(dist_val) == 1: @@ -561,7 +561,7 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations): """ agg_name = agg.__class__.__name__ if not self.check_aggregate_support(agg): - raise NotImplementedError('%s spatial aggregate is not implmented for this backend.' % agg_name) + raise NotImplementedError('%s spatial aggregate is not implemented for this backend.' % agg_name) agg_name = agg_name.lower() if agg_name == 'union': agg_name += 'agg' diff --git a/django/contrib/gis/db/backends/spatialite/creation.py b/django/contrib/gis/db/backends/spatialite/creation.py index 06f105d563..8cadef9f9c 100644 --- a/django/contrib/gis/db/backends/spatialite/creation.py +++ b/django/contrib/gis/db/backends/spatialite/creation.py @@ -116,7 +116,7 @@ class SpatiaLiteCreation(DatabaseCreation): def spatialite_init_file(self): # SPATIALITE_SQL may be placed in settings to tell GeoDjango - # to use a specific path to the SpatiaLite initilization SQL. + # to use a specific path to the SpatiaLite initialization SQL. return getattr(settings, 'SPATIALITE_SQL', 'init_spatialite-%s.%s.sql' % self.connection.ops.spatial_version[:2]) diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py index ad44b470b3..718add0618 100644 --- a/django/contrib/gis/db/backends/spatialite/operations.py +++ b/django/contrib/gis/db/backends/spatialite/operations.py @@ -233,7 +233,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations): placeholder = '%s(%%s, %s)' % (self.transform, f.srid) else: placeholder = '%s' - # No geometry value used for F expression, substitue in + # No geometry value used for F expression, substitute in # the column name instead. return placeholder % self.get_expression_column(value) else: @@ -310,7 +310,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations): """ agg_name = agg.__class__.__name__ if not self.check_aggregate_support(agg): - raise NotImplementedError('%s spatial aggregate is not implmented for this backend.' % agg_name) + raise NotImplementedError('%s spatial aggregate is not implemented for this backend.' % agg_name) agg_name = agg_name.lower() if agg_name == 'union': agg_name += 'agg' diff --git a/django/contrib/gis/db/models/query.py b/django/contrib/gis/db/models/query.py index b368f425be..3d0c2beec7 100644 --- a/django/contrib/gis/db/models/query.py +++ b/django/contrib/gis/db/models/query.py @@ -73,7 +73,7 @@ class GeoQuerySet(QuerySet): def collect(self, **kwargs): """ Performs an aggregate collect operation on the given geometry field. - This is analagous to a union operation, but much faster because + This is analogous to a union operation, but much faster because boundaries are not dissolved. """ return self._spatial_aggregate(aggregates.Collect, **kwargs) @@ -137,7 +137,7 @@ class GeoQuerySet(QuerySet): def geojson(self, precision=8, crs=False, bbox=False, **kwargs): """ - Returns a GeoJSON representation of the geomtry field in a `geojson` + Returns a GeoJSON representation of the geometry field in a `geojson` attribute on each element of the GeoQuerySet. The `crs` and `bbox` keywords may be set to True if the user wants diff --git a/django/contrib/gis/db/models/sql/compiler.py b/django/contrib/gis/db/models/sql/compiler.py index b81c8a42a7..398d702d71 100644 --- a/django/contrib/gis/db/models/sql/compiler.py +++ b/django/contrib/gis/db/models/sql/compiler.py @@ -21,7 +21,7 @@ class GeoSQLCompiler(compiler.SQLCompiler): If 'with_aliases' is true, any column names that are duplicated (without the table names) are given unique aliases. This is needed in - some cases to avoid ambiguitity with nested queries. + some cases to avoid ambiguity with nested queries. This routine is overridden from Query to handle customized selection of geometry columns. diff --git a/django/contrib/gis/feeds.py b/django/contrib/gis/feeds.py index 7e7b872df6..f77a2eae0f 100644 --- a/django/contrib/gis/feeds.py +++ b/django/contrib/gis/feeds.py @@ -21,7 +21,7 @@ class GeoFeedMixin(object): def add_georss_point(self, handler, coords, w3c_geo=False): """ Adds a GeoRSS point with the given coords using the given handler. - Handles the differences between simple GeoRSS and the more pouplar + Handles the differences between simple GeoRSS and the more popular W3C Geo specification. """ if w3c_geo: diff --git a/django/contrib/gis/gdal/prototypes/errcheck.py b/django/contrib/gis/gdal/prototypes/errcheck.py index 491641646e..72231188c8 100644 --- a/django/contrib/gis/gdal/prototypes/errcheck.py +++ b/django/contrib/gis/gdal/prototypes/errcheck.py @@ -12,7 +12,7 @@ from django.utils import six # Helper routines for retrieving pointers and/or values from # arguments passed in by reference. def arg_byref(args, offset=-1): - "Returns the pointer argument's by-refernece value." + "Returns the pointer argument's by-reference value." return args[offset]._obj.value @@ -56,8 +56,8 @@ def check_string(result, func, cargs, offset=-1, str_result=False): ptr = ptr_byref(cargs, offset) # Getting the string value s = ptr.value - # Correctly freeing the allocated memory beind GDAL pointer - # w/the VSIFree routine. + # Correctly freeing the allocated memory behind GDAL pointer + # with the VSIFree routine. if ptr: lgdal.VSIFree(ptr) return s @@ -131,7 +131,7 @@ def check_str_arg(result, func, cargs): """ This is for the OSRGet[Angular|Linear]Units functions, which require that the returned string pointer not be freed. This - returns both the double and tring values. + returns both the double and string values. """ dbl = result ptr = cargs[-1]._obj diff --git a/django/contrib/gis/gdal/srs.py b/django/contrib/gis/gdal/srs.py index 2c05bfb943..65989f5c89 100644 --- a/django/contrib/gis/gdal/srs.py +++ b/django/contrib/gis/gdal/srs.py @@ -120,7 +120,7 @@ class SpatialReference(GDALBase): 0 >>> print(srs['UNIT|AUTHORITY']) # For the units authority, have to use the pipe symbole. EPSG - >>> print(srs['UNIT|AUTHORITY', 1]) # The authority value for the untis + >>> print(srs['UNIT|AUTHORITY', 1]) # The authority value for the units 9122 """ if isinstance(target, tuple): diff --git a/django/contrib/gis/gdal/tests/test_envelope.py b/django/contrib/gis/gdal/tests/test_envelope.py index 555ca69531..c79a8e54da 100644 --- a/django/contrib/gis/gdal/tests/test_envelope.py +++ b/django/contrib/gis/gdal/tests/test_envelope.py @@ -20,7 +20,7 @@ class EnvelopeTest(unittest.TestCase): self.e = Envelope(0, 0, 5, 5) def test01_init(self): - "Testing Envelope initilization." + "Testing Envelope initialization." e1 = Envelope((0, 0, 5, 5)) Envelope(0, 0, 5, 5) Envelope(0, '0', '5', 5) # Thanks to ww for this diff --git a/django/contrib/gis/gdal/tests/test_geom.py b/django/contrib/gis/gdal/tests/test_geom.py index ed6bb2ad9c..bf028d19db 100644 --- a/django/contrib/gis/gdal/tests/test_geom.py +++ b/django/contrib/gis/gdal/tests/test_geom.py @@ -300,7 +300,7 @@ class OGRGeomTest(unittest.TestCase, TestDataMixin): self.assertEqual(4269, mpoly.srid) self.assertEqual('NAD83', mpoly.srs.name) - # Incrementing through the multipolyogn after the spatial reference + # Incrementing through the multipolygon after the spatial reference # has been re-assigned. for poly in mpoly: self.assertEqual(mpoly.srs.wkt, poly.srs.wkt) diff --git a/django/contrib/gis/geoip/base.py b/django/contrib/gis/geoip/base.py index 5e3b39347a..608cb5e65f 100644 --- a/django/contrib/gis/geoip/base.py +++ b/django/contrib/gis/geoip/base.py @@ -192,7 +192,7 @@ class GeoIP(object): def country(self, query): """ - Returns a dictonary with with the country code and name when given an + Returns a dictionary with with the country code and name when given an IP address or a Fully Qualified Domain Name (FQDN). For example, both '24.124.1.80' and 'djangoproject.com' are valid parameters. """ diff --git a/django/contrib/gis/geoip/prototypes.py b/django/contrib/gis/geoip/prototypes.py index 8d78386584..8ddcb9d974 100644 --- a/django/contrib/gis/geoip/prototypes.py +++ b/django/contrib/gis/geoip/prototypes.py @@ -56,7 +56,7 @@ GeoIPRecord_delete.restype = None def check_record(result, func, cargs): if result: # Checking the pointer to the C structure, if valid pull out elements - # into a dicionary. + # into a dictionary. rec = result.contents record = dict((fld, getattr(rec, fld)) for fld, ctype in rec._fields_) diff --git a/django/contrib/gis/geos/geometry.py b/django/contrib/gis/geos/geometry.py index f453f113f7..244e301a3f 100644 --- a/django/contrib/gis/geos/geometry.py +++ b/django/contrib/gis/geos/geometry.py @@ -78,7 +78,7 @@ class GEOSGeometry(GEOSBase, ListMixin): else: raise ValueError('String or unicode input unrecognized as WKT EWKT, and HEXEWKB.') elif isinstance(geo_input, GEOM_PTR): - # When the input is a pointer to a geomtry (GEOM_PTR). + # When the input is a pointer to a geometry (GEOM_PTR). g = geo_input elif isinstance(geo_input, memoryview): # When the input is a buffer (WKB). @@ -682,7 +682,7 @@ class GEOSGeometry(GEOSBase, ListMixin): def length(self): """ Returns the length of this Geometry (e.g., 0 for point, or the - circumfrence of a Polygon). + circumference of a Polygon). """ return capi.geos_length(self.ptr, byref(c_double())) diff --git a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos.py index 5be05cee50..b6c5c6f587 100644 --- a/django/contrib/gis/geos/libgeos.py +++ b/django/contrib/gis/geos/libgeos.py @@ -38,7 +38,7 @@ else: raise ImportError('Unsupported OS "%s"' % os.name) # Using the ctypes `find_library` utility to find the path to the GEOS -# shared library. This is better than manually specifiying each library name +# shared library. This is better than manually specifying each library name # and extension (e.g., libgeos_c.[so|so.1|dylib].). if lib_names: for lib_name in lib_names: @@ -121,7 +121,7 @@ def get_pointer_arr(n): return GeomArr() # Returns the string version of the GEOS library. Have to set the restype -# explicitly to c_char_p to ensure compatibility accross 32 and 64-bit platforms. +# explicitly to c_char_p to ensure compatibility across 32 and 64-bit platforms. geos_version = lgeos.GEOSversion geos_version.argtypes = None geos_version.restype = c_char_p diff --git a/django/contrib/gis/geos/tests/test_geos.py b/django/contrib/gis/geos/tests/test_geos.py index 4c38c9bfcb..3d666947e4 100644 --- a/django/contrib/gis/geos/tests/test_geos.py +++ b/django/contrib/gis/geos/tests/test_geos.py @@ -68,7 +68,7 @@ class GEOSTest(unittest.TestCase, TestDataMixin): # Because pointers have been set to NULL, an exception should be # raised when we try to access it. Raising an exception is - # preferrable to a segmentation fault that commonly occurs when + # preferable to a segmentation fault that commonly occurs when # a C method is given a NULL memory reference. for fg in (fg1, fg2): # Equivalent to `fg.ptr` @@ -167,7 +167,7 @@ class GEOSTest(unittest.TestCase, TestDataMixin): "Testing creation from HEX." for g in self.geometries.hex_wkt: geom_h = GEOSGeometry(g.hex) - # we need to do this so decimal places get normalised + # we need to do this so decimal places get normalized geom_t = fromstr(g.wkt) self.assertEqual(geom_t.wkt, geom_h.wkt) @@ -176,7 +176,7 @@ class GEOSTest(unittest.TestCase, TestDataMixin): for g in self.geometries.hex_wkt: wkb = memoryview(a2b_hex(g.hex.encode())) geom_h = GEOSGeometry(wkb) - # we need to do this so decimal places get normalised + # we need to do this so decimal places get normalized geom_t = fromstr(g.wkt) self.assertEqual(geom_t.wkt, geom_h.wkt) @@ -788,7 +788,7 @@ class GEOSTest(unittest.TestCase, TestDataMixin): ls = LineString((0, 0), (1, 1)) self.assertAlmostEqual(1.41421356237, ls.length, 11) - # Should be circumfrence of Polygon + # Should be circumference of Polygon poly = Polygon(LinearRing((0, 0), (0, 1), (1, 1), (1, 0), (0, 0))) self.assertEqual(4.0, poly.length) diff --git a/django/contrib/gis/maps/google/overlays.py b/django/contrib/gis/maps/google/overlays.py index e7e563e199..d9ba31380a 100644 --- a/django/contrib/gis/maps/google/overlays.py +++ b/django/contrib/gis/maps/google/overlays.py @@ -158,7 +158,7 @@ class GPolyline(GOverlayBase): opacity: The opacity of the polyline, between 0 and 1. Defaults to 1. """ - # If a GEOS geometry isn't passed in, try to contsruct one. + # If a GEOS geometry isn't passed in, try to construct one. if isinstance(geom, six.string_types): geom = fromstr(geom) if isinstance(geom, (tuple, list)): diff --git a/django/contrib/gis/measure.py b/django/contrib/gis/measure.py index b8070c715a..456f1c7277 100644 --- a/django/contrib/gis/measure.py +++ b/django/contrib/gis/measure.py @@ -27,7 +27,7 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # """ -Distance and Area objects to allow for sensible and convienient calculation +Distance and Area objects to allow for sensible and convenient calculation and conversions. Authors: Robert Coup, Justin Bronn, Riccardo Di Virgilio diff --git a/django/contrib/gis/static/gis/js/OLMapWidget.js b/django/contrib/gis/static/gis/js/OLMapWidget.js index c14491e633..16e75f7b8f 100644 --- a/django/contrib/gis/static/gis/js/OLMapWidget.js +++ b/django/contrib/gis/static/gis/js/OLMapWidget.js @@ -22,7 +22,7 @@ OpenLayers.Util.properFeatures = function(features, geom_type) { /** * Class: OpenLayers.Format.DjangoWKT * Class for reading Well-Known Text, with workarounds to successfully parse - * geometries and collections as returnes by django.contrib.gis.geos. + * geometries and collections as returned by django.contrib.gis.geos. * * Inherits from: * - @@ -190,7 +190,7 @@ function MapWidget(options) { scrollable: true }; - // Altering using user-provied options + // Altering using user-provided options for (var property in options) { if (options.hasOwnProperty(property)) { this.options[property] = options[property]; diff --git a/django/contrib/gis/tests/distapp/tests.py b/django/contrib/gis/tests/distapp/tests.py index fcb78895d3..b97078d989 100644 --- a/django/contrib/gis/tests/distapp/tests.py +++ b/django/contrib/gis/tests/distapp/tests.py @@ -24,7 +24,7 @@ class DistanceTest(TestCase): if HAS_GEOS and HAS_SPATIAL_DB: # A point we are testing distances with -- using a WGS84 - # coordinate that'll be implicitly transormed to that to + # coordinate that'll be implicitly transformed to that to # the coordinate system of the field, EPSG:32140 (Texas South Central # w/units in meters) stx_pnt = GEOSGeometry('POINT (-95.370401017314293 29.704867409475465)', 4326) diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py index f1b2f1adbe..01ed519f28 100644 --- a/django/contrib/gis/tests/geoapp/tests.py +++ b/django/contrib/gis/tests/geoapp/tests.py @@ -345,7 +345,7 @@ class GeoLookupTest(TestCase): nmi = State.objects.create(name='Northern Mariana Islands', poly=None) self.assertEqual(nmi.poly, None) - # Assigning a geomery and saving -- then UPDATE back to NULL. + # Assigning a geometry and saving -- then UPDATE back to NULL. nmi.poly = 'POLYGON((0 0,1 0,1 1,1 0,0 0))' nmi.save() State.objects.filter(name='Northern Mariana Islands').update(poly=None) @@ -359,7 +359,7 @@ class GeoLookupTest(TestCase): pnt1 = fromstr('POINT (649287.0363174 4177429.4494686)', srid=2847) pnt2 = fromstr('POINT(-98.4919715741052 29.4333344025053)', srid=4326) - # Not passing in a geometry as first param shoud + # Not passing in a geometry as first param should # raise a type error when initializing the GeoQuerySet self.assertRaises(ValueError, Country.objects.filter, mpoly__relate=(23, 'foo')) diff --git a/django/contrib/gis/tests/inspectapp/tests.py b/django/contrib/gis/tests/inspectapp/tests.py index 2690dc484d..b89cc2b944 100644 --- a/django/contrib/gis/tests/inspectapp/tests.py +++ b/django/contrib/gis/tests/inspectapp/tests.py @@ -76,7 +76,7 @@ class OGRInspectTest(TestCase): self.assertEqual(model_def, '\n'.join(expected)) def test_time_field(self): - # Only possible to test this on PostGIS at the momemnt. MySQL + # Only possible to test this on PostGIS at the moment. MySQL # complains about permissions, and SpatiaLite/Oracle are # insanely difficult to get support compiled in for in GDAL. if not connections['default'].ops.postgis: diff --git a/django/contrib/gis/tests/maps/tests.py b/django/contrib/gis/tests/maps/tests.py index a37fc55d97..24a9511c88 100644 --- a/django/contrib/gis/tests/maps/tests.py +++ b/django/contrib/gis/tests/maps/tests.py @@ -28,7 +28,7 @@ class GoogleMapsTest(TestCase): @override_settings(GOOGLE_MAPS_API_KEY=GOOGLE_MAPS_API_KEY) def test_unicode_in_google_maps(self): """ - Test that GoogleMap doesn't crash with non-ascii content. + Test that GoogleMap doesn't crash with non-ASCII content. """ from django.contrib.gis.geos import Point from django.contrib.gis.maps.google.gmap import GoogleMap, GMarker diff --git a/django/contrib/gis/tests/test_measure.py b/django/contrib/gis/tests/test_measure.py index 37a0d51dbb..643a1b1794 100644 --- a/django/contrib/gis/tests/test_measure.py +++ b/django/contrib/gis/tests/test_measure.py @@ -1,5 +1,5 @@ """ -Distance and Area objects to allow for sensible and convienient calculation +Distance and Area objects to allow for sensible and convenient calculation and conversions. Here are some tests. """ @@ -12,7 +12,7 @@ class DistanceTest(unittest.TestCase): "Testing the Distance object" def testInit(self): - "Testing initialisation from valid units" + "Testing initialization from valid units" d = Distance(m=100) self.assertEqual(d.m, 100) @@ -33,7 +33,7 @@ class DistanceTest(unittest.TestCase): self.assertEqual(d.mm, 1000.0) def testInitInvalid(self): - "Testing initialisation from invalid units" + "Testing initialization from invalid units" self.assertRaises(AttributeError, D, banana=100) def testAccess(self): @@ -149,7 +149,7 @@ class AreaTest(unittest.TestCase): "Testing the Area object" def testInit(self): - "Testing initialisation from valid units" + "Testing initialization from valid units" a = Area(sq_m=100) self.assertEqual(a.sq_m, 100) @@ -160,7 +160,7 @@ class AreaTest(unittest.TestCase): self.assertEqual(a.sq_m, 258998811.0336) def testInitInvaliA(self): - "Testing initialisation from invalid units" + "Testing initialization from invalid units" self.assertRaises(AttributeError, A, banana=100) def testAccess(self): diff --git a/django/contrib/gis/utils/layermapping.py b/django/contrib/gis/utils/layermapping.py index c834cb03b0..b2c9417d31 100644 --- a/django/contrib/gis/utils/layermapping.py +++ b/django/contrib/gis/utils/layermapping.py @@ -489,7 +489,7 @@ class LayerMapping(object): progress: When this keyword is set, status information will be printed giving - the number of features processed and sucessfully saved. By default, + the number of features processed and successfully saved. By default, progress information will pe printed every 1000 features processed, however, this default may be overridden by setting this keyword with an integer for the desired interval. diff --git a/django/core/files/uploadhandler.py b/django/core/files/uploadhandler.py index 2fa1d7a934..c6fddce331 100644 --- a/django/core/files/uploadhandler.py +++ b/django/core/files/uploadhandler.py @@ -111,7 +111,7 @@ class FileUploadHandler(object): Receive data from the streamed upload parser. ``start`` is the position in the file of the chunk. """ - raise NotImplementedError('subclasses of FileUploadHandler must provide a recieve_data_chunk() method') + raise NotImplementedError('subclasses of FileUploadHandler must provide a receive_data_chunk() method') def file_complete(self, file_size): """ diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 19e7e53176..185b8e93f1 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -162,7 +162,7 @@ class WSGIHandler(base.BaseHandler): if self._request_middleware is None: with self.initLock: try: - # Check that middleware is still uninitialised. + # Check that middleware is still uninitialized. if self._request_middleware is None: self.load_middleware() except: diff --git a/django/core/management/base.py b/django/core/management/base.py index 77c0bc6034..b07c1cbd26 100644 --- a/django/core/management/base.py +++ b/django/core/management/base.py @@ -208,7 +208,7 @@ class BaseCommand(object): def __init__(self): self.style = color_style() - # `requires_model_validation` is deprecated in favour of + # `requires_model_validation` is deprecated in favor of # `requires_system_checks`. If both options are present, an error is # raised. Otherwise the present option is used. If none of them is # defined, the default value (True) is used. @@ -218,7 +218,7 @@ class BaseCommand(object): if has_old_option: warnings.warn( '"requires_model_validation" is deprecated ' - 'in favour of "requires_system_checks".', + 'in favor of "requires_system_checks".', PendingDeprecationWarning) if has_old_option and has_new_option: raise ImproperlyConfigured( diff --git a/django/core/management/commands/inspectdb.py b/django/core/management/commands/inspectdb.py index 4a51892e5a..c9d7e33bac 100644 --- a/django/core/management/commands/inspectdb.py +++ b/django/core/management/commands/inspectdb.py @@ -96,7 +96,7 @@ class Command(NoArgsCommand): field_type = "ForeignKey('%s'" % rel_to else: # Calling `get_field_type` to get the field type string and any - # additional paramters and notes. + # additional parameters and notes. field_type, field_params, field_notes = self.get_field_type(connection, table_name, row) extra_params.update(field_params) comment_notes.extend(field_notes) diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py index ad6b7edde2..50da31e11e 100644 --- a/django/core/management/commands/migrate.py +++ b/django/core/management/commands/migrate.py @@ -224,7 +224,7 @@ class Command(BaseCommand): cursor.execute(statement) tables.append(connection.introspection.table_name_converter(model._meta.db_table)) - # We force a commit here, as that was the previous behaviour. + # We force a commit here, as that was the previous behavior. # If you can prove we don't need this, remove it. transaction.set_dirty(using=connection.alias) finally: diff --git a/django/core/management/commands/validate.py b/django/core/management/commands/validate.py index b032c33f94..6b894c6440 100644 --- a/django/core/management/commands/validate.py +++ b/django/core/management/commands/validate.py @@ -10,6 +10,6 @@ class Command(CheckCommand): help = 'Deprecated. Use "check" command instead. ' + CheckCommand.help def handle_noargs(self, **options): - warnings.warn('"validate" has been deprecated in favour of "check".', + warnings.warn('"validate" has been deprecated in favor of "check".', PendingDeprecationWarning) super(Command, self).handle_noargs(**options) diff --git a/django/core/management/templates.py b/django/core/management/templates.py index c2a6476912..d1044cbfab 100644 --- a/django/core/management/templates.py +++ b/django/core/management/templates.py @@ -266,7 +266,7 @@ class TemplateCommand(BaseCommand): guessed_filename += ext # Move the temporary file to a filename that has better - # chances of being recognnized by the archive utils + # chances of being recognized by the archive utils if used_name != guessed_filename: guessed_path = path.join(tempdir, guessed_filename) shutil.move(the_path, guessed_path) diff --git a/django/core/signing.py b/django/core/signing.py index ea870d169c..4a74b91ee2 100644 --- a/django/core/signing.py +++ b/django/core/signing.py @@ -10,7 +10,7 @@ There are two components here, separated by a ':'. The first component is a URLsafe base64 encoded JSON of the object passed to dumps(). The second component is a base64 encoded hmac/SHA1 hash of "$first_component:$secret" -signing.loads(s) checks the signature and returns the deserialised object. +signing.loads(s) checks the signature and returns the deserialized object. If the signature fails, a BadSignature exception is raised. >>> signing.loads("ImhlbGxvIg:1QaUZC:YIye-ze3TTx7gtSv422nZA4sgmk") diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py index d513541e2e..5c8bd0cef9 100644 --- a/django/db/backends/__init__.py +++ b/django/db/backends/__init__.py @@ -665,7 +665,7 @@ class BaseDatabaseFeatures(object): # supported by the Python driver supports_paramstyle_pyformat = True - # Does the backend require literal defaults, rather than parameterised ones? + # Does the backend require literal defaults, rather than parameterized ones? requires_literal_defaults = False # Does the backend require a connection reset after each material schema change? @@ -1387,7 +1387,7 @@ class BaseDatabaseClient(object): class BaseDatabaseValidation(object): """ - This class encapsualtes all backend-specific model validation. + This class encapsulates all backend-specific model validation. """ def __init__(self, connection): self.connection = connection diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index f549663497..d6aaf35ab0 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -575,7 +575,7 @@ class DatabaseWrapper(BaseDatabaseWrapper): # these are set in single statement it isn't clear what is supposed # to happen. cursor.execute("ALTER SESSION SET NLS_TERRITORY = 'AMERICA'") - # Set oracle date to ansi date format. This only needs to execute + # Set Oracle date to ANSI date format. This only needs to execute # once when we create a new connection. We also set the Territory # to 'AMERICA' which forces Sunday to evaluate to a '1' in # TO_CHAR(). @@ -730,7 +730,7 @@ class OracleParam(object): class VariableWrapper(object): """ An adapter class for cursor variables that prevents the wrapped object - from being converted into a string when used to instanciate an OracleParam. + from being converted into a string when used to instantiate an OracleParam. This can be used generally for any other object that should be passed into Cursor.execute as-is. """ diff --git a/django/db/backends/schema.py b/django/db/backends/schema.py index 638ae08436..afc60c30b1 100644 --- a/django/db/backends/schema.py +++ b/django/db/backends/schema.py @@ -732,7 +732,7 @@ class BaseDatabaseSchemaEditor(object): def _alter_column_type_sql(self, table, column, type): """ - Hook to specialise column type alteration for different backends, + Hook to specialize column type alteration for different backends, for cases when a creation type is different to an alteration type (e.g. SERIAL in PostgreSQL, PostGIS fields). diff --git a/django/db/migrations/executor.py b/django/db/migrations/executor.py index 9cbd1b04df..1a7832b76f 100644 --- a/django/db/migrations/executor.py +++ b/django/db/migrations/executor.py @@ -124,7 +124,7 @@ class MigrationExecutor(object): def detect_soft_applied(self, migration): """ - Tests whether a migration has been implicity applied - that the + Tests whether a migration has been implicitly applied - that the tables it would create exist. This is intended only for use on initial migrations (as it only looks for CreateModel). """ diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py index d00e2e2df2..7096ee9578 100644 --- a/django/db/migrations/loader.py +++ b/django/db/migrations/loader.py @@ -23,7 +23,7 @@ class MigrationLoader(object): an app. Their names are entirely unimportant from a code perspective, but will probably follow the 1234_name.py convention. - On initialisation, this class will scan those directories, and open and + On initialization, this class will scan those directories, and open and read the python files, looking for a class called Migration, which should inherit from django.db.migrations.Migration. See django.db.migrations.migration for what that looks like. diff --git a/django/db/migrations/migration.py b/django/db/migrations/migration.py index 6bbfce2dfb..0114dba60c 100644 --- a/django/db/migrations/migration.py +++ b/django/db/migrations/migration.py @@ -12,7 +12,7 @@ class Migration(object): - replaces: A list of migration_names Note that all migrations come out of migrations and into the Loader or - Graph as instances, having been initialised with their app label and name. + Graph as instances, having been initialized with their app label and name. """ # Operations to apply during this migration, in order. diff --git a/django/db/migrations/optimizer.py b/django/db/migrations/optimizer.py index 3e9dc42aa3..ad221d2285 100644 --- a/django/db/migrations/optimizer.py +++ b/django/db/migrations/optimizer.py @@ -7,8 +7,8 @@ class MigrationOptimizer(object): and you are returned a list of equal or shorter length - operations are merged into one if possible. - For example, a CreateModel and an AddField can be optimised into a - new CreateModel, and CreateModel and DeleteModel can be optimised into + For example, a CreateModel and an AddField can be optimized into a + new CreateModel, and CreateModel and DeleteModel can be optimized into nothing. """ @@ -17,9 +17,9 @@ class MigrationOptimizer(object): Main optimization entry point. Pass in a list of Operation instances, get out a new list of Operation instances. - Unfortunately, due to the scope of the optimisation (two combinable + Unfortunately, due to the scope of the optimization (two combinable operations might be separated by several hundred others), this can't be - done as a peephole optimisation with checks/output implemented on + done as a peephole optimization with checks/output implemented on the Operations themselves; instead, the optimizer looks at each individual operation and scans forwards in the list to see if there are any matches, stopping at boundaries - operations which can't diff --git a/django/db/models/deletion.py b/django/db/models/deletion.py index 8b48815a0d..7d64680b37 100644 --- a/django/db/models/deletion.py +++ b/django/db/models/deletion.py @@ -97,7 +97,7 @@ class Collector(object): def add_field_update(self, field, value, objs): """ - Schedules a field update. 'objs' must be a homogenous iterable + Schedules a field update. 'objs' must be a homogeneous iterable collection of model instances (e.g. a QuerySet). """ if not objs: @@ -148,7 +148,7 @@ class Collector(object): source_attr=None, reverse_dependency=False): """ Adds 'objs' to the collection of objects to be deleted as well as all - parent instances. 'objs' must be a homogenous iterable collection of + parent instances. 'objs' must be a homogeneous iterable collection of model instances (e.g. a QuerySet). If 'collect_related' is True, related objects will be handled by their respective on_delete handler. diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index be1f237b12..e0df900a8b 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -64,7 +64,7 @@ class FieldDoesNotExist(Exception): # A guide to Field parameters: # -# * name: The name of the field specifed in the model. +# * name: The name of the field specified in the model. # * attname: The attribute to use on the model object. This is the same as # "name", except in the case of ForeignKeys, where "_id" is # appended. @@ -306,7 +306,7 @@ class Field(RegisterLookupMixin): * top-level classes, top-level functions - will be referenced by their full import path * Storage instances - these have their own deconstruct() method - This is because the values here must be serialised into a text format + This is because the values here must be serialized into a text format (possibly new Python code, possibly JSON) and these are the only types with encoding handlers defined. diff --git a/django/db/models/query.py b/django/db/models/query.py index 4d258ff60d..954ca65f3a 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -1287,14 +1287,14 @@ def get_klass_info(klass, max_depth=0, cur_depth=0, requested=None, Helper function that recursively returns an information for a klass, to be used in get_cached_row. It exists just to compute this information only once for entire queryset. Otherwise it would be computed for each row, which - leads to poor perfomance on large querysets. + leads to poor performance on large querysets. Arguments: * klass - the class to retrieve (and instantiate) * max_depth - the maximum depth to which a select_related() relationship should be explored. * cur_depth - the current depth in the select_related() tree. - Used in recursive calls to determin if we should dig deeper. + Used in recursive calls to determine if we should dig deeper. * requested - A dictionary describing the select_related() tree that is to be retrieved. keys are field names; values are dictionaries describing the keys on that related object that @@ -1359,7 +1359,7 @@ def get_klass_info(klass, max_depth=0, cur_depth=0, requested=None, field_names = [f.attname for f in klass._meta.concrete_fields if f.model in non_seen_models] field_count = len(field_names) - # Try to avoid populating field_names variable for perfomance reasons. + # Try to avoid populating field_names variable for performance reasons. # If field_names variable is set, we use **kwargs based model init # which is slower than normal init. if field_count == len(klass._meta.concrete_fields): @@ -1552,7 +1552,7 @@ class RawQuerySet(object): else: model_cls = self.model # All model's fields are present in the query. So, it is possible - # to use *args based model instantation. For each field of the model, + # to use *args based model instantiation. For each field of the model, # record the query column position matching that field. model_init_field_pos = [] for field in self.model._meta.fields: @@ -1762,7 +1762,7 @@ def prefetch_related_objects(result_cache, related_lookups): # Descend down tree - # We assume that objects retrieved are homogenous (which is the premise + # We assume that objects retrieved are homogeneous (which is the premise # of prefetch_related), so what applies to first object applies to all. first_obj = obj_list[0] prefetcher, descriptor, attr_found, is_fetched = get_prefetcher(first_obj, through_attr) diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py index b6971e9f24..be37bc8632 100644 --- a/django/db/models/query_utils.py +++ b/django/db/models/query_utils.py @@ -109,7 +109,7 @@ class DeferredAttribute(object): val = self._check_parent_chain(instance, name) if val is None: # We use only() instead of values() here because we want the - # various data coersion methods (to_python(), etc.) to be + # various data coercion methods (to_python(), etc.) to be # called here. val = getattr( non_deferred_model._base_manager.only(name).using( diff --git a/django/db/models/related.py b/django/db/models/related.py index ba2a90c545..6e4f946ea9 100644 --- a/django/db/models/related.py +++ b/django/db/models/related.py @@ -26,7 +26,7 @@ class RelatedObject(object): as SelectField choices for this field. Analogue of django.db.models.fields.Field.get_choices, provided - initially for utilisation by RelatedFieldListFilter. + initially for utilization by RelatedFieldListFilter. """ first_choice = blank_choice if include_blank else [] queryset = self.model._default_manager.all() diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index d4bd61d462..11c503cd5d 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -890,7 +890,7 @@ class SQLInsertCompiler(SQLCompiler): col = "%s.%s" % (qn(opts.db_table), qn(opts.pk.column)) result.append("VALUES (%s)" % ", ".join(placeholders[0])) r_fmt, r_params = self.connection.ops.return_insert_id() - # Skip empty r_fmt to allow subclasses to customize behaviour for + # Skip empty r_fmt to allow subclasses to customize behavior for # 3rd party backends. Refs #19096. if r_fmt: result.append(r_fmt % col) diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 703ed12eda..7bfdceb183 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -568,7 +568,7 @@ class Query(object): Converts the self.deferred_loading data structure to an alternate data structure, describing the field that *will* be loaded. This is used to compute the columns to select from the database and also by the - QuerySet class to work out which fields are being initialised on each + QuerySet class to work out which fields are being initialized on each model. Models that have all their fields included aren't mentioned in the result, only those that have field restrictions in place. @@ -1767,7 +1767,7 @@ class Query(object): """ # Fields on related models are stored in the literal double-underscore # format, so that we can use a set datastructure. We do the foo__bar - # splitting and handling when computing the SQL colum names (as part of + # splitting and handling when computing the SQL column names (as part of # get_columns()). existing, defer = self.deferred_loading if defer: diff --git a/django/db/transaction.py b/django/db/transaction.py index c64972b8e9..25ec81d87a 100644 --- a/django/db/transaction.py +++ b/django/db/transaction.py @@ -426,7 +426,7 @@ def _transaction_func(entering, exiting, using): """ Takes 3 things, an entering function (what to do to start this block of transaction management), an exiting function (what to do to end it, on both - success and failure, and using which can be: None, indiciating using is + success and failure, and using which can be: None, indicating using is DEFAULT_DB_ALIAS, a callable, indicating that using is DEFAULT_DB_ALIAS and to return the function already wrapped. diff --git a/django/dispatch/dispatcher.py b/django/dispatch/dispatcher.py index d9766f62b1..ba97077ce5 100644 --- a/django/dispatch/dispatcher.py +++ b/django/dispatch/dispatcher.py @@ -27,7 +27,7 @@ class Signal(object): Internal attributes: receivers - { receriverkey (id) : weakref(receiver) } + { receiverkey (id) : weakref(receiver) } """ def __init__(self, providing_args=None, use_caching=False): """ diff --git a/django/forms/forms.py b/django/forms/forms.py index e34e089878..26967fba5c 100644 --- a/django/forms/forms.py +++ b/django/forms/forms.py @@ -190,7 +190,7 @@ class BaseForm(object): for e in bf_errors]) hidden_fields.append(six.text_type(bf)) else: - # Create a 'class="..."' atribute if the row should have any + # Create a 'class="..."' attribute if the row should have any # CSS classes applied. css_classes = bf.css_classes() if css_classes: diff --git a/django/forms/formsets.py b/django/forms/formsets.py index 215ec1d876..d5600867e1 100644 --- a/django/forms/formsets.py +++ b/django/forms/formsets.py @@ -347,7 +347,7 @@ class BaseFormSet(object): """ Hook for doing any extra formset-wide cleaning after Form.clean() has been called on every form. Any ValidationError raised by this method - will not be associated with a particular form; it will be accesible + will not be associated with a particular form; it will be accessible via formset.non_form_errors() """ pass diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py index eecf6150d4..6d03f877a1 100644 --- a/django/http/multipartparser.py +++ b/django/http/multipartparser.py @@ -253,7 +253,7 @@ class MultiPartParser(object): def handle_file_complete(self, old_field_name, counters): """ - Handle all the signalling that takes place when a file is complete. + Handle all the signaling that takes place when a file is complete. """ for i, handler in enumerate(self._upload_handlers): file_obj = handler.file_complete(counters[i]) @@ -484,7 +484,7 @@ class BoundaryIter(six.Iterator): self._done = True return chunk[:end] else: - # make sure we dont treat a partial boundary (and + # make sure we don't treat a partial boundary (and # its separators) as data if not chunk[:-rollback]: # and len(chunk) >= (len(self._boundary) + 6): # There's nothing left, we should just return and mark as done. @@ -498,7 +498,7 @@ class BoundaryIter(six.Iterator): """ Finds a multipart boundary in data. - Should no boundry exist in the data None is returned instead. Otherwise + Should no boundary exist in the data None is returned instead. Otherwise a tuple containing the indices of the following are returned: * the end of current encapsulation diff --git a/django/http/response.py b/django/http/response.py index 324f67c847..602e03284d 100644 --- a/django/http/response.py +++ b/django/http/response.py @@ -189,7 +189,7 @@ class HttpResponseBase(six.Iterator): return self._headers[header.lower()][1] def __getstate__(self): - # SimpleCookie is not pickeable with pickle.HIGHEST_PROTOCOL, so we + # SimpleCookie is not pickleable with pickle.HIGHEST_PROTOCOL, so we # serialize to a string instead state = self.__dict__.copy() state['cookies'] = str(state['cookies']) @@ -274,7 +274,7 @@ class HttpResponseBase(six.Iterator): return bytes(value) # Handle string types -- we can't rely on force_bytes here because: - # - under Python 3 it attemps str conversion first + # - under Python 3 it attempts str conversion first # - when self._charset != 'utf-8' it re-encodes the content if isinstance(value, bytes): return bytes(value) diff --git a/django/template/base.py b/django/template/base.py index f9a3ea6682..e829604418 100644 --- a/django/template/base.py +++ b/django/template/base.py @@ -69,7 +69,7 @@ libraries = {} builtins = [] # True if TEMPLATE_STRING_IF_INVALID contains a format string (%s). None means -# uninitialised. +# uninitialized. invalid_var_format_string = None diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index 0f24d23a02..4f89c930b3 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -567,7 +567,7 @@ def cycle(parser, token, escape=False): {% endfor %} Outside of a loop, give the values a unique name the first time you call - it, then use that name each sucessive time through:: + it, then use that name each successive time through:: ... ... @@ -944,7 +944,7 @@ def do_if(parser, token): {% endif %} {% if athlete_list and coach_list %} - Both atheletes and coaches are available. + Both athletes and coaches are available. {% endif %} {% if not athlete_list or coach_list %} diff --git a/django/test/_doctest.py b/django/test/_doctest.py index 048d886720..4d9346b71f 100644 --- a/django/test/_doctest.py +++ b/django/test/_doctest.py @@ -2253,7 +2253,7 @@ class DocTestCase(unittest.TestCase): caller can catch the errors and initiate post-mortem debugging. The DocTestCase provides a debug method that raises - UnexpectedException errors if there is an unexepcted + UnexpectedException errors if there is an unexpected exception: >>> test = DocTestParser().get_doctest('>>> raise KeyError\n42', diff --git a/django/test/signals.py b/django/test/signals.py index 600255ef61..eaa31d7494 100644 --- a/django/test/signals.py +++ b/django/test/signals.py @@ -122,7 +122,7 @@ def complex_setting_changed(**kwargs): if kwargs['enter'] and kwargs['setting'] in COMPLEX_OVERRIDE_SETTINGS: # Considering the current implementation of the signals framework, # stacklevel=5 shows the line containing the override_settings call. - warnings.warn("Overriding setting %s can lead to unexpected behaviour." + warnings.warn("Overriding setting %s can lead to unexpected behavior." % kwargs['setting'], stacklevel=5) diff --git a/django/test/testcases.py b/django/test/testcases.py index 2764fc0886..e4aaac3d42 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -1182,7 +1182,7 @@ class LiveServerTestCase(TransactionTestCase): cls.server_thread.terminate() cls.server_thread.join() - # Restore sqlite connections' non-sharability + # Restore sqlite connections' non-shareability for conn in connections.all(): if (conn.vendor == 'sqlite' and conn.settings_dict['NAME'] == ':memory:'): diff --git a/django/test/utils.py b/django/test/utils.py index 393da3b17c..03e8f17ad1 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -259,7 +259,7 @@ class modify_settings(override_settings): """ def __init__(self, *args, **kwargs): if args: - # Hack used when instaciating from SimpleTestCase._pre_setup. + # Hack used when instantiating from SimpleTestCase._pre_setup. assert not kwargs self.operations = args[0] else: diff --git a/django/utils/functional.py b/django/utils/functional.py index 52be83ce43..e5c49ccddd 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -282,7 +282,7 @@ _super = super class SimpleLazyObject(LazyObject): """ - A lazy object initialised from any function. + A lazy object initialized from any function. Designed for compound objects of unknown type. For builtins or objects of known type, use django.utils.functional.lazy. diff --git a/django/utils/html.py b/django/utils/html.py index a08b62ff5e..aab87df9f7 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -213,13 +213,13 @@ def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False): Links can have trailing punctuation (periods, commas, close-parens) and leading punctuation (opening parens) and it'll still do the right thing. - If trim_url_limit is not None, the URLs in link text longer than this limit - will truncated to trim_url_limit-3 characters and appended with an elipsis. + If trim_url_limit is not None, the URLs in the link text longer than this + limit will be truncated to trim_url_limit-3 characters and appended with + an ellipsis. - If nofollow is True, the URLs in link text will get a rel="nofollow" - attribute. + If nofollow is True, the links will get a rel="nofollow" attribute. - If autoescape is True, the link text and URLs will get autoescaped. + If autoescape is True, the link text and URLs will be autoescaped. """ def trim_url(x, limit=trim_url_limit): if limit is None or len(x) <= limit: diff --git a/django/utils/ipv6.py b/django/utils/ipv6.py index 0aaa326c01..c545b24618 100644 --- a/django/utils/ipv6.py +++ b/django/utils/ipv6.py @@ -14,7 +14,7 @@ def clean_ipv6_address(ip_str, unpack_ipv4=False, Validity is checked by calling is_valid_ipv6_address() - if an invalid address is passed, ValidationError is raised. - Replaces the longest continious zero-sequence with "::" and + Replaces the longest continuous zero-sequence with "::" and removes leading zeroes and makes sure all hextets are lowercase. Args: diff --git a/django/utils/jslex.py b/django/utils/jslex.py index 1b47230b6d..e54d021bbe 100644 --- a/django/utils/jslex.py +++ b/django/utils/jslex.py @@ -82,7 +82,7 @@ class JsLexer(Lexer): >>> list(lexer.lex("a = 1")) [('id', 'a'), ('ws', ' '), ('punct', '='), ('ws', ' '), ('dnum', '1')] - This doesn't properly handle non-Ascii characters in the Javascript source. + This doesn't properly handle non-ASCII characters in the Javascript source. """ # Because these tokens are matched as alternatives in a regex, longer diff --git a/django/utils/regex_helper.py b/django/utils/regex_helper.py index 199b4ea87d..60a0e7acfa 100644 --- a/django/utils/regex_helper.py +++ b/django/utils/regex_helper.py @@ -169,7 +169,7 @@ def normalize(pattern): count, ch = get_quantifier(ch, pattern_iter) if ch: # We had to look ahead, but it wasn't need to compute the - # quanitifer, so use this character next time around the + # quantifier, so use this character next time around the # main loop. consume_next = False diff --git a/django/utils/six.py b/django/utils/six.py index 0b1b3f93d3..a20a28fc93 100644 --- a/django/utils/six.py +++ b/django/utils/six.py @@ -641,7 +641,7 @@ if PY3: else: _assertRaisesRegex = "assertRaisesRegexp" _assertRegex = "assertRegexpMatches" - # memoryview and buffer are not stricly equivalent, but should be fine for + # memoryview and buffer are not strictly equivalent, but should be fine for # django core usage (mainly BinaryField). However, Jython doesn't support # buffer (see http://bugs.jython.org/issue1521), so we have to be careful. if sys.platform.startswith('java'): diff --git a/tests/admin_changelist/tests.py b/tests/admin_changelist/tests.py index ca889f0648..431999d6d0 100644 --- a/tests/admin_changelist/tests.py +++ b/tests/admin_changelist/tests.py @@ -191,7 +191,7 @@ class ChangeListTests(TestCase): def test_distinct_for_m2m_in_list_filter(self): """ Regression test for #13902: When using a ManyToMany in list_filter, - results shouldn't apper more than once. Basic ManyToMany. + results shouldn't appear more than once. Basic ManyToMany. """ blues = Genre.objects.create(name='Blues') band = Band.objects.create(name='B.B. King Review', nr_of_members=11) @@ -215,7 +215,7 @@ class ChangeListTests(TestCase): def test_distinct_for_through_m2m_in_list_filter(self): """ Regression test for #13902: When using a ManyToMany in list_filter, - results shouldn't apper more than once. With an intermediate model. + results shouldn't appear more than once. With an intermediate model. """ lead = Musician.objects.create(name='Vox') band = Group.objects.create(name='The Hype') @@ -238,7 +238,7 @@ class ChangeListTests(TestCase): def test_distinct_for_inherited_m2m_in_list_filter(self): """ Regression test for #13902: When using a ManyToMany in list_filter, - results shouldn't apper more than once. Model managed in the + results shouldn't appear more than once. Model managed in the admin inherits from the one that defins the relationship. """ lead = Musician.objects.create(name='John') @@ -262,7 +262,7 @@ class ChangeListTests(TestCase): def test_distinct_for_m2m_to_inherited_in_list_filter(self): """ Regression test for #13902: When using a ManyToMany in list_filter, - results shouldn't apper more than once. Target of the relationship + results shouldn't appear more than once. Target of the relationship inherits from another. """ lead = ChordsMusician.objects.create(name='Player A') diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py index 4ef584f3de..2f3fdfdf6c 100644 --- a/tests/admin_inlines/tests.py +++ b/tests/admin_inlines/tests.py @@ -63,7 +63,7 @@ class TestInline(TestCase): def test_inline_primary(self): person = Person.objects.create(firstname='Imelda') item = OutfitItem.objects.create(name='Shoes') - # Imelda likes shoes, but can't cary her own bags. + # Imelda likes shoes, but can't carry her own bags. data = { 'shoppingweakness_set-TOTAL_FORMS': 1, 'shoppingweakness_set-INITIAL_FORMS': 0, @@ -91,7 +91,7 @@ class TestInline(TestCase): 'title_set-0-title2': 'a different title', } response = self.client.post('/admin/admin_inlines/titlecollection/add/', data) - # Here colspan is "4": two fields (title1 and title2), one hidden field and the delete checkbock. + # Here colspan is "4": two fields (title1 and title2), one hidden field and the delete checkbox. self.assertContains(response, '') def test_no_parent_callable_lookup(self): @@ -109,7 +109,7 @@ class TestInline(TestCase): self.assertEqual(response.status_code, 200) # Add parent object view should have the child inlines section self.assertContains(response, '
') - # The right callabe should be used for the inline readonly_fields + # The right callable should be used for the inline readonly_fields # column cells self.assertContains(response, '

Callable in QuestionInline

') diff --git a/tests/admin_ordering/tests.py b/tests/admin_ordering/tests.py index acd1a5ccdb..7a6efb0b4d 100644 --- a/tests/admin_ordering/tests.py +++ b/tests/admin_ordering/tests.py @@ -58,7 +58,7 @@ class TestAdminOrdering(TestCase): def test_dynamic_ordering(self): """ - Let's use a custom ModelAdmin that changes the ordering dinamically. + Let's use a custom ModelAdmin that changes the ordering dynamically. """ super_user = User.objects.create(username='admin', is_superuser=True) other_user = User.objects.create(username='other') diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index af6aa92754..289f0bdd65 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals """ -A series of tests to establish that the command-line managment tools work as +A series of tests to establish that the command-line management tools work as advertised - especially with regards to the handling of the DJANGO_SETTINGS_MODULE and default settings.py files. """ @@ -1474,7 +1474,7 @@ class CommandTypes(AdminScriptTestCase): def test_run_from_argv_non_ascii_error(self): """ - Test that non-ascii message of CommandError does not raise any + Test that non-ASCII message of CommandError does not raise any UnicodeDecodeError in run_from_argv. """ def raise_command_error(*args, **kwargs): diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 5e4edf6909..c39e99aa1b 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -249,7 +249,7 @@ class AdminViewBasicTest(AdminViewBasicTestCase): def testChangeListSortingModel(self): """ Ensure we can sort on a list_display field that is a Model method - (colunn 3 is 'model_year' in ArticleAdmin) + (column 3 is 'model_year' in ArticleAdmin) """ response = self.client.get('/test_admin/%s/admin_views/article/' % self.urlbit, {'o': '-3'}) self.assertContentBefore(response, 'Newest content', 'Middle content', @@ -729,7 +729,7 @@ class AdminCustomTemplateTests(AdminViewBasicTestCase): group = Group.objects.create(name="foogroup") post_data = { 'action': 'delete_selected', - 'selected_accross': '0', + 'selected_across': '0', 'index': '0', '_selected_action': group.id } @@ -1185,7 +1185,7 @@ class AdminViewPermissionsTest(TestCase): 'date_0': '2008-03-18', 'date_1': '10:54:39', 'section': 1} - # add user shoud not be able to view the list of article or change any of them + # add user should not be able to view the list of article or change any of them self.client.get('/test_admin/admin/') self.client.post(login_url, self.adduser_login) response = self.client.get('/test_admin/admin/admin_views/article/') @@ -1259,7 +1259,7 @@ class AdminViewPermissionsTest(TestCase): login_url = reverse('admin:login') + '?next=/test_admin/admin/' - # add user shoud not be able to view the list of article or change any of them + # add user should not be able to view the list of article or change any of them self.client.get('/test_admin/admin/') self.client.post(login_url, self.adduser_login) response = self.client.get('/test_admin/admin/admin_views/article/1/history/') @@ -1366,7 +1366,7 @@ class AdminViewPermissionsTest(TestCase): login_url = reverse('admin:login') + '?next=/test_admin/admin/' delete_dict = {'post': 'yes'} - # add user shoud not be able to delete articles + # add user should not be able to delete articles self.client.get('/test_admin/admin/') self.client.post(login_url, self.adduser_login) response = self.client.get('/test_admin/admin/admin_views/article/1/delete/') @@ -1749,7 +1749,7 @@ class AdminViewStringPrimaryKeyTest(TestCase): @override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',)) class SecureViewTests(TestCase): """ - Test behaviour of a view protected by the staff_member_required decorator. + Test behavior of a view protected by the staff_member_required decorator. """ urls = "admin_views.urls" fixtures = ['admin-views-users.xml'] @@ -1782,7 +1782,7 @@ class AdminViewUnicodeTest(TestCase): def testUnicodeEdit(self): """ - A test to ensure that POST on edit_view handles non-ascii characters. + A test to ensure that POST on edit_view handles non-ASCII characters. """ post_data = { "name": "Test lærdommer", @@ -1815,7 +1815,7 @@ class AdminViewUnicodeTest(TestCase): def testUnicodeDelete(self): """ - Ensure that the delete_view handles non-ascii characters + Ensure that the delete_view handles non-ASCII characters """ delete_dict = {'post': 'yes'} response = self.client.get('/test_admin/admin/admin_views/book/1/delete/') @@ -3995,7 +3995,7 @@ class CSSTest(TestCase): def testAppModelInFormBodyClass(self): """ - Ensure app and model tag are correcly read by change_form template + Ensure app and model tag are correctly read by change_form template """ response = self.client.get('/test_admin/admin/admin_views/section/add/') self.assertEqual(response.status_code, 200) @@ -4004,7 +4004,7 @@ class CSSTest(TestCase): def testAppModelInListBodyClass(self): """ - Ensure app and model tag are correcly read by change_list template + Ensure app and model tag are correctly read by change_list template """ response = self.client.get('/test_admin/admin/admin_views/section/') self.assertEqual(response.status_code, 200) @@ -4013,7 +4013,7 @@ class CSSTest(TestCase): def testAppModelInDeleteConfirmationBodyClass(self): """ - Ensure app and model tag are correcly read by delete_confirmation + Ensure app and model tag are correctly read by delete_confirmation template """ response = self.client.get( @@ -4024,7 +4024,7 @@ class CSSTest(TestCase): def testAppModelInAppIndexBodyClass(self): """ - Ensure app and model tag are correcly read by app_index template + Ensure app and model tag are correctly read by app_index template """ response = self.client.get('/test_admin/admin/admin_views/') self.assertEqual(response.status_code, 200) @@ -4032,7 +4032,7 @@ class CSSTest(TestCase): def testAppModelInDeleteSelectedConfirmationBodyClass(self): """ - Ensure app and model tag are correcly read by + Ensure app and model tag are correctly read by delete_selected_confirmation template """ action_data = { @@ -4719,7 +4719,7 @@ class AdminViewOnSiteTests(TestCase): ) def test_true(self): - "Ensure that the default behaviour is followed if view_on_site is True" + "Ensure that the default behavior is followed if view_on_site is True" response = self.client.get('/test_admin/admin/admin_views/city/1/') content_type_pk = ContentType.objects.get_for_model(City).pk self.assertContains(response, diff --git a/tests/aggregation_regress/tests.py b/tests/aggregation_regress/tests.py index dc3d3e2e46..9fce51059b 100644 --- a/tests/aggregation_regress/tests.py +++ b/tests/aggregation_regress/tests.py @@ -70,7 +70,7 @@ class AggregationTests(TestCase): Regression test for #11916: Extra params + aggregation creates incorrect SQL. """ - # oracle doesn't support subqueries in group by clause + # Oracle doesn't support subqueries in group by clause shortest_book_sql = """ SELECT name FROM aggregation_regress_book b @@ -1080,7 +1080,7 @@ class AggregationTests(TestCase): ) def test_name_expressions(self): - # Test that aggregates are spotted corretly from F objects. + # Test that aggregates are spotted correctly from F objects. # Note that Adrian's age is 34 in the fixtures, and he has one book # so both conditions match one author. qs = Author.objects.annotate(Count('book')).filter( diff --git a/tests/backends/tests.py b/tests/backends/tests.py index d5116898ec..eaded5dbae 100644 --- a/tests/backends/tests.py +++ b/tests/backends/tests.py @@ -563,14 +563,14 @@ class BackendTestCase(TestCase): @skipUnlessDBFeature('supports_paramstyle_pyformat') def test_cursor_execute_with_pyformat(self): - #10070: Support pyformat style passing of paramters + #10070: Support pyformat style passing of parameters args = {'root': 3, 'square': 9} self.create_squares(args, 'pyformat', multiple=False) self.assertEqual(models.Square.objects.count(), 1) @skipUnlessDBFeature('supports_paramstyle_pyformat') def test_cursor_executemany_with_pyformat(self): - #10070: Support pyformat style passing of paramters + #10070: Support pyformat style passing of parameters args = [{'root': i, 'square': i ** 2} for i in range(-5, 6)] self.create_squares(args, 'pyformat', multiple=True) self.assertEqual(models.Square.objects.count(), 11) @@ -733,7 +733,7 @@ class FkConstraintsTests(TransactionTestCase): with transaction.atomic(): # Create an Article. models.Article.objects.create(headline="Test article", pub_date=datetime.datetime(2010, 9, 4), reporter=self.r) - # Retrive it from the DB + # Retrieve it from the DB a = models.Article.objects.get(headline="Test article") a.reporter_id = 30 try: @@ -751,7 +751,7 @@ class FkConstraintsTests(TransactionTestCase): with transaction.atomic(): # Create an Article. models.Article.objects.create(headline="Test article", pub_date=datetime.datetime(2010, 9, 4), reporter=self.r) - # Retrive it from the DB + # Retrieve it from the DB a = models.Article.objects.get(headline="Test article") a.reporter_id = 30 try: @@ -768,7 +768,7 @@ class FkConstraintsTests(TransactionTestCase): with transaction.atomic(): # Create an Article. models.Article.objects.create(headline="Test article", pub_date=datetime.datetime(2010, 9, 4), reporter=self.r) - # Retrive it from the DB + # Retrieve it from the DB a = models.Article.objects.get(headline="Test article") a.reporter_id = 30 with connection.constraint_checks_disabled(): diff --git a/tests/basic/tests.py b/tests/basic/tests.py index 976fb1124d..7b1f78a3b6 100644 --- a/tests/basic/tests.py +++ b/tests/basic/tests.py @@ -871,7 +871,7 @@ class SelectOnSaveTests(TestCase): with self.assertNumQueries(2): asos.save() self.assertTrue(FakeQuerySet.called) - # This is not wanted behaviour, but this is how Django has always + # This is not wanted behavior, but this is how Django has always # behaved for databases that do not return correct information # about matched rows for UPDATE. with self.assertRaises(DatabaseError): diff --git a/tests/cache/tests.py b/tests/cache/tests.py index f5d213e759..8c7fbc6d45 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -1292,7 +1292,7 @@ class CacheUtils(TestCase): def test_cache_key_varies_by_url(self): """ - get_cache_key keys differ by fully-qualfied URL instead of path + get_cache_key keys differ by fully-qualified URL instead of path """ request1 = self.factory.get(self.path, HTTP_HOST='sub-1.example.com') learn_cache_key(request1, HttpResponse()) diff --git a/tests/defer/tests.py b/tests/defer/tests.py index 266a851ffe..43a088f3e2 100644 --- a/tests/defer/tests.py +++ b/tests/defer/tests.py @@ -110,7 +110,7 @@ class DeferTests(TestCase): obj.name = "c2" obj.save() - # You can retrive a single column on a base class with no fields + # You can retrieve a single column on a base class with no fields obj = Child.objects.only("name").get(name="c2") self.assert_delayed(obj, 3) self.assertEqual(obj.name, "c2") diff --git a/tests/extra_regress/tests.py b/tests/extra_regress/tests.py index 4eaecc19af..8749cb8ebf 100644 --- a/tests/extra_regress/tests.py +++ b/tests/extra_regress/tests.py @@ -131,7 +131,7 @@ class ExtraRegressTests(TestCase): """ Regression test for #8039: Ordering sometimes removed relevant tables from extra(). This test is the critical case: ordering uses a table, - but then removes the reference because of an optimisation. The table + but then removes the reference because of an optimization. The table should still be present because of the extra() call. """ self.assertQuerysetEqual( diff --git a/tests/field_subclassing/fields.py b/tests/field_subclassing/fields.py index e9c7a982e8..43ece22e82 100644 --- a/tests/field_subclassing/fields.py +++ b/tests/field_subclassing/fields.py @@ -59,7 +59,7 @@ class SmallerField(SmallField): class JSONField(six.with_metaclass(models.SubfieldBase, models.TextField)): - description = ("JSONField automatically serializes and desializes values to " + description = ("JSONField automatically serializes and deserializes values to " "and from JSON.") def to_python(self, value): diff --git a/tests/field_subclassing/tests.py b/tests/field_subclassing/tests.py index 3045f7d226..6a3d1cad20 100644 --- a/tests/field_subclassing/tests.py +++ b/tests/field_subclassing/tests.py @@ -39,7 +39,7 @@ class CustomField(TestCase): # Custom fields still have normal field's attributes. self.assertEqual(m._meta.get_field("data").verbose_name, "small field") - # The m.data attribute has been initialised correctly. It's a Small + # The m.data attribute has been initialized correctly. It's a Small # object. self.assertEqual((m.data.first, m.data.second), (1, 2)) @@ -100,7 +100,7 @@ class CustomField(TestCase): http://users.rcn.com/python/download/Descriptor.htm#properties """ # Even when looking for totally different properties, SubfieldBase's - # non property like behaviour made inspect crash. Refs #12568. + # non property like behavior made inspect crash. Refs #12568. data = dict(inspect.getmembers(MyModel)) self.assertIn('__module__', data) self.assertEqual(data['__module__'], 'field_subclassing.models') diff --git a/tests/file_storage/tests.py b/tests/file_storage/tests.py index ae2076c5e4..4ffba851eb 100644 --- a/tests/file_storage/tests.py +++ b/tests/file_storage/tests.py @@ -341,7 +341,7 @@ class FileStorageTests(unittest.TestCase): def test_file_chunks_error(self): """ - Test behaviour when file.chunks() is raising an error + Test behavior when file.chunks() is raising an error """ f1 = ContentFile('chunks fails') diff --git a/tests/fixtures/tests.py b/tests/fixtures/tests.py index a964ae79d7..88eadae6b9 100644 --- a/tests/fixtures/tests.py +++ b/tests/fixtures/tests.py @@ -304,7 +304,7 @@ class FixtureLoadingTests(DumpDataAssertMixin, TestCase): ]) def test_ambiguous_compressed_fixture(self): - # The name "fixture5" is ambigous, so loading it will raise an error + # The name "fixture5" is ambiguous, so loading it will raise an error with self.assertRaises(management.CommandError) as cm: management.call_command('loaddata', 'fixture5', verbosity=0) self.assertIn("Multiple fixtures named 'fixture5'", cm.exception.args[0]) diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py index 6984db30c6..61fc66d928 100644 --- a/tests/fixtures_regress/tests.py +++ b/tests/fixtures_regress/tests.py @@ -64,7 +64,7 @@ class TestFixtures(TestCase): def test_loaddata_not_found_fields_not_ignore(self): """ Test for ticket #9279 -- Error is raised for entries in - the serialised data for fields that have been removed + the serialized data for fields that have been removed from the database when not ignored. """ with self.assertRaises(DeserializationError): @@ -77,7 +77,7 @@ class TestFixtures(TestCase): def test_loaddata_not_found_fields_ignore(self): """ Test for ticket #9279 -- Ignores entries in - the serialised data for fields that have been removed + the serialized data for fields that have been removed from the database. """ management.call_command( @@ -90,7 +90,7 @@ class TestFixtures(TestCase): def test_loaddata_not_found_fields_ignore_xml(self): """ - Test for ticket #19998 -- Ignore entries in the XML serialised data + Test for ticket #19998 -- Ignore entries in the XML serialized data for fields that have been removed from the model definition. """ management.call_command( diff --git a/tests/foreign_object/models.py b/tests/foreign_object/models.py index 5ec6f6d28b..fc51118149 100644 --- a/tests/foreign_object/models.py +++ b/tests/foreign_object/models.py @@ -113,7 +113,7 @@ class ArticleTranslationDescriptor(ReverseSingleRelatedObjectDescriptor): class ColConstraint(object): - # Antyhing with as_sql() method works in get_extra_restriction(). + # Anything with as_sql() method works in get_extra_restriction(). def __init__(self, alias, col, value): self.alias, self.col, self.value = alias, col, value diff --git a/tests/forms_tests/tests/test_extra.py b/tests/forms_tests/tests/test_extra.py index 100c655117..f74a6a08b2 100644 --- a/tests/forms_tests/tests/test_extra.py +++ b/tests/forms_tests/tests/test_extra.py @@ -510,7 +510,7 @@ class FormsExtraTestCase(TestCase, AssertFormErrorsMixin): self.assertFormErrors(['This is not a valid IPv6 address.'], f.clean, '1:2') def test_generic_ipaddress_normalization(self): - # Test the normalising code + # Test the normalizing code f = GenericIPAddressField() self.assertEqual(f.clean(' ::ffff:0a0a:0a0a '), '::ffff:10.10.10.10') self.assertEqual(f.clean(' ::ffff:10.10.10.10 '), '::ffff:10.10.10.10') diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py index f06a31f393..c05c79a68e 100644 --- a/tests/forms_tests/tests/test_forms.py +++ b/tests/forms_tests/tests/test_forms.py @@ -1710,7 +1710,7 @@ class FormsTestCase(TestCase): def test_empty_permitted(self): # Sometimes (pretty much in formsets) we want to allow a form to pass validation # if it is completely empty. We can accomplish this by using the empty_permitted - # agrument to a form constructor. + # argument to a form constructor. class SongForm(Form): artist = CharField() name = CharField() diff --git a/tests/generic_views/urls.py b/tests/generic_views/urls.py index 8b2560b0f9..1ecc0ec898 100644 --- a/tests/generic_views/urls.py +++ b/tests/generic_views/urls.py @@ -164,7 +164,7 @@ urlpatterns = patterns('', views.AuthorListCustomPaginator.as_view()), # YearArchiveView - # Mixing keyword and possitional captures below is intentional; the views + # Mixing keyword and positional captures below is intentional; the views # ought to be able to accept either. (r'^dates/books/(?P\d{4})/$', views.BookYearArchive.as_view()), diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py index bd18700076..f0a7b35fae 100644 --- a/tests/i18n/test_extraction.py +++ b/tests/i18n/test_extraction.py @@ -100,7 +100,7 @@ class ExtractorTests(SimpleTestCase): return self._assertPoLocComment(True, po_filename, line_number, *comment_parts) def assertLocationCommentNotPresent(self, po_filename, line_number, *comment_parts): - """Check the oposite of assertLocationComment()""" + """Check the opposite of assertLocationComment()""" return self._assertPoLocComment(False, po_filename, line_number, *comment_parts) diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index 794ed6fd77..6c5ede7c61 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -44,7 +44,7 @@ class InspectDBTestCase(TestCase): return assertFieldType - # Inspecting oracle DB doesn't produce correct results, see #19884 + # Inspecting Oracle DB doesn't produce correct results, see #19884 @expectedFailureOnOracle def test_field_types(self): """Test introspection of various Django field types""" @@ -163,7 +163,7 @@ class InspectDBTestCase(TestCase): self.assertIn("field_field_1 = models.IntegerField(db_column='__field')", output) self.assertIn("prc_x = models.IntegerField(db_column='prc(%) x')", output) if PY3: - # Python 3 allows non-ascii identifiers + # Python 3 allows non-ASCII identifiers self.assertIn("tamaño = models.IntegerField()", output) else: self.assertIn("tama_o = models.IntegerField(db_column='tama\\xf1o')", output) diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py index f5e0b744de..df6192ee11 100644 --- a/tests/lookup/tests.py +++ b/tests/lookup/tests.py @@ -628,7 +628,7 @@ class LookupTests(TestCase): def test_regex_non_ascii(self): """ - Ensure that a regex lookup does not trip on non-ascii characters. + Ensure that a regex lookup does not trip on non-ASCII characters. """ Player.objects.create(name='\u2660') Player.objects.get(name__regex='\u2660') diff --git a/tests/m2m_recursive/tests.py b/tests/m2m_recursive/tests.py index fe13b27239..8ab86aaaee 100644 --- a/tests/m2m_recursive/tests.py +++ b/tests/m2m_recursive/tests.py @@ -168,12 +168,12 @@ class RecursiveM2MTests(TestCase): attrgetter("name"), ordered=False ) - # As the assertQuerysetEqual uses a set for comparrison, + # As the assertQuerysetEqual uses a set for comparison, # check we've only got David listed once self.assertEqual(self.a.idols.all().count(), 1) def test_recursive_m2m_related_to_self(self): - """ Check the expected behaviour when an instance is related to itself """ + """ Check the expected behavior when an instance is related to itself """ # Ann idolizes herself self.a.idols.add(self.a) diff --git a/tests/mail/tests.py b/tests/mail/tests.py index 935508aa16..5912d94efb 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -39,7 +39,7 @@ class HeadersCheckMixin(object): Check that :param message: has all :param headers: headers. :param message: can be an instance of an email.Message subclass or a - string with the contens of an email message. + string with the contents of an email message. :param headers: should be a set of (header-name, header-value) tuples. """ if isinstance(message, binary_type): @@ -103,7 +103,7 @@ class MailTests(HeadersCheckMixin, SimpleTestCase): def test_space_continuation(self): """ - Test for space continuation character in long (ascii) subject headers (#7747) + Test for space continuation character in long (ASCII) subject headers (#7747) """ email = EmailMessage('Long subject lines that get wrapped should contain a space continuation character to get expected behavior in Outlook and Thunderbird', 'Content', 'from@example.com', ['to@example.com']) message = email.message() @@ -630,7 +630,7 @@ class BaseEmailBackendTests(HeadersCheckMixin, object): def test_close_connection(self): """ - Test that connection can be closed (even when not explicitely opened) + Test that connection can be closed (even when not explicitly opened) """ conn = mail.get_connection(username='', password='') try: diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py index 54c13dd0ee..f9d1a76078 100644 --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -300,7 +300,7 @@ class BooleanFieldTests(unittest.TestCase): old_default = boolean_field.default try: boolean_field.default = NOT_PROVIDED - # check patch was succcessful + # check patch was successful self.assertFalse(boolean_field.has_default()) b = BooleanModel() self.assertIsNone(b.bfield) diff --git a/tests/model_forms_regress/tests.py b/tests/model_forms_regress/tests.py index d6c05f3153..2d115f515b 100644 --- a/tests/model_forms_regress/tests.py +++ b/tests/model_forms_regress/tests.py @@ -285,7 +285,7 @@ class OneToOneFieldTests(TestCase): self.assertEqual(form.cleaned_data['publication'], None) author = form.save() # author object returned from form still retains original publication object - # that's why we need to retreive it from database again + # that's why we need to retrieve it from database again new_author = Author.objects.get(pk=author.pk) self.assertEqual(new_author.publication, None) diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py index b631018828..952ba45aab 100644 --- a/tests/model_regress/tests.py +++ b/tests/model_regress/tests.py @@ -140,7 +140,7 @@ class ModelTests(TestCase): def test_date_filter_null(self): # Date filtering was failing with NULL date values in SQLite - # (regression test for #3501, amongst other things). + # (regression test for #3501, among other things). Party.objects.create(when=datetime.datetime(1999, 1, 1)) Party.objects.create() p = Party.objects.filter(when__month=1)[0] diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index fb46023502..f6a250db09 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -127,7 +127,7 @@ class ModelAdminTests(TestCase): def test_field_arguments_restricted_on_form(self): # If we specify fields or fieldsets, it should exclude fields on the Form class # to the fields specified. This may cause errors to be raised in the db layer if - # required model fields arent in fields/fieldsets, but that's preferable to + # required model fields aren't in fields/fieldsets, but that's preferable to # ghost errors where you have a field in your Form class that isn't being # displayed because you forgot to add it to fields/fieldsets diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py index 8ffe00578b..8f3ff29dcf 100644 --- a/tests/multiple_database/tests.py +++ b/tests/multiple_database/tests.py @@ -182,7 +182,7 @@ class QueryTestCase(TestCase): dive = Book.objects.using('other').get(title="Dive into Python") mark = Person.objects.using('other').get(name="Mark Pilgrim") - # Retrive related object by descriptor. Related objects should be database-baound + # Retrieve related object by descriptor. Related objects should be database-bound self.assertEqual(list(dive.authors.all().values_list('name', flat=True)), ['Mark Pilgrim']) @@ -397,7 +397,7 @@ class QueryTestCase(TestCase): chris = Person.objects.using('other').create(name="Chris Mills") - # Save the author's favourite books + # Save the author's favorite books pro.editor = george pro.save() @@ -425,7 +425,7 @@ class QueryTestCase(TestCase): chris = Person.objects.using('other').get(name="Chris Mills") dive = Book.objects.using('other').get(title="Dive into Python") - # Retrive related object by descriptor. Related objects should be database-baound + # Retrieve related object by descriptor. Related objects should be database-bound self.assertEqual(list(chris.edited.values_list('title', flat=True)), ['Dive into Python']) @@ -620,7 +620,7 @@ class QueryTestCase(TestCase): alice_profile = UserProfile.objects.using('default').get(flavor='chocolate') bob_profile = UserProfile.objects.using('other').get(flavor='crunchy frog') - # Retrive related object by descriptor. Related objects should be database-baound + # Retrieve related object by descriptor. Related objects should be database-bound self.assertEqual(alice_profile.user.username, 'alice') self.assertEqual(bob_profile.user.username, 'bob') @@ -721,7 +721,7 @@ class QueryTestCase(TestCase): # Reget the objects to clear caches dive = Book.objects.using('other').get(title="Dive into Python") - # Retrive related object by descriptor. Related objects should be database-bound + # Retrieve related object by descriptor. Related objects should be database-bound self.assertEqual(list(dive.reviews.all().values_list('source', flat=True)), ['Python Weekly']) diff --git a/tests/mutually_referential/models.py b/tests/mutually_referential/models.py index 25bc45731f..230a1ec237 100644 --- a/tests/mutually_referential/models.py +++ b/tests/mutually_referential/models.py @@ -11,11 +11,11 @@ class Parent(models.Model): name = models.CharField(max_length=100) # Use a simple string for forward declarations. - bestchild = models.ForeignKey("Child", null=True, related_name="favoured_by") + bestchild = models.ForeignKey("Child", null=True, related_name="favored_by") class Child(models.Model): name = models.CharField(max_length=100) - # You can also explicitally specify the related app. + # You can also explicitly specify the related app. parent = models.ForeignKey("mutually_referential.Parent") diff --git a/tests/pagination/tests.py b/tests/pagination/tests.py index 000ef0450a..c2ad54c5ad 100644 --- a/tests/pagination/tests.py +++ b/tests/pagination/tests.py @@ -286,7 +286,7 @@ class ModelPaginationTests(TestCase): def test_page_getitem(self): """ - Tests proper behaviour of a paginator page __getitem__ (queryset + Tests proper behavior of a paginator page __getitem__ (queryset evaluation, slicing, exception raised). """ paginator = Paginator(Article.objects.all(), 5) diff --git a/tests/queries/models.py b/tests/queries/models.py index b38f672ea6..1083968d41 100644 --- a/tests/queries/models.py +++ b/tests/queries/models.py @@ -153,7 +153,7 @@ class Number(models.Model): def __str__(self): return six.text_type(self.num) -# Symmetrical m2m field with a normal field using the reverse accesor name +# Symmetrical m2m field with a normal field using the reverse accessor name # ("valid"). diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 7bb5bb34d0..a21b19a100 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -942,7 +942,7 @@ class Queries1Tests(BaseQuerysetTest): def test_ticket_10790_2(self): # Querying across several tables should strip only the last outer join, - # while preserving the preceeding inner joins. + # while preserving the preceding inner joins. q = Tag.objects.filter(parent__parent__isnull=False) self.assertQuerysetEqual( @@ -2266,7 +2266,7 @@ class ConditionalTests(BaseQuerysetTest): # for the related field). self.assertEqual(len(Tag.objects.order_by('parent')), 5) - # ... but you can still order in a non-recursive fashion amongst linked + # ... but you can still order in a non-recursive fashion among linked # fields (the previous test failed because the default ordering was # recursive). self.assertQuerysetEqual( diff --git a/tests/raw_query/tests.py b/tests/raw_query/tests.py index 73f8b9d7c9..17479df6cd 100644 --- a/tests/raw_query/tests.py +++ b/tests/raw_query/tests.py @@ -229,7 +229,7 @@ class RawQueryTests(TestCase): def test_inheritance(self): # date is the end of the Cuban Missile Crisis, I have no idea when - # Wesley was bron + # Wesley was born f = FriendlyAuthor.objects.create(first_name="Wesley", last_name="Chun", dob=date(1962, 10, 28)) query = "SELECT * FROM raw_query_friendlyauthor" diff --git a/tests/servers/tests.py b/tests/servers/tests.py index 8f8a310c71..6e31da340a 100644 --- a/tests/servers/tests.py +++ b/tests/servers/tests.py @@ -140,7 +140,7 @@ class LiveServerViews(LiveServerBase): def test_no_collectstatic_emulation(self): """ Test that LiveServerTestCase reports a 404 status code when HTTP client - tries to access a static file that isn't explictly put under + tries to access a static file that isn't explicitly put under STATIC_ROOT. """ try: diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py index 174ac241d3..754fdd32ab 100644 --- a/tests/settings_tests/tests.py +++ b/tests/settings_tests/tests.py @@ -291,7 +291,7 @@ class TestComplexSettingOverride(TestCase): self.assertEqual(os.path.splitext(w[0].filename)[0], os.path.splitext(__file__)[0]) self.assertEqual(str(w[0].message), - 'Overriding setting TEST_WARN can lead to unexpected behaviour.') + 'Overriding setting TEST_WARN can lead to unexpected behavior.') class TrailingSlashURLTests(TestCase): diff --git a/tests/template_tests/test_loaders.py b/tests/template_tests/test_loaders.py index f89b9803e4..d2227878f0 100644 --- a/tests/template_tests/test_loaders.py +++ b/tests/template_tests/test_loaders.py @@ -117,7 +117,7 @@ class EggLoaderTest(TestCase): class CachedLoader(TestCase): def test_templatedir_caching(self): "Check that the template directories form part of the template cache key. Refs #13573" - # Retrive a template specifying a template directory to check + # Retrieve a template specifying a template directory to check t1, name = loader.find_template('test.html', (os.path.join(os.path.dirname(upath(__file__)), 'templates', 'first'),)) # Now retrieve the same template name, but from a different directory t2, name = loader.find_template('test.html', (os.path.join(os.path.dirname(upath(__file__)), 'templates', 'second'),)) diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py index 1a0e0d4456..cfe2b5b480 100644 --- a/tests/template_tests/tests.py +++ b/tests/template_tests/tests.py @@ -233,7 +233,7 @@ class TemplateLoaderTests(TestCase): self.assertTrue(template_name.endswith(load_name), 'Template loaded by filesystem loader has incorrect name for debug page: %s' % template_name) - # Aso test the cached loader, since it overrides load_template + # Also test the cached loader, since it overrides load_template cache_loader = cached.Loader(('',)) cache_loader._cached_loaders = loader.template_source_loaders loader.template_source_loaders = (cache_loader,) diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py index 0d026971fe..80a2cb8e54 100644 --- a/tests/test_runner/tests.py +++ b/tests/test_runner/tests.py @@ -268,7 +268,7 @@ class Sqlite3InMemoryTestDbs(TestCase): other = db.connections['other'] runner.DiscoverRunner(verbosity=0).setup_databases() msg = "DATABASES setting '%s' option set to sqlite3's ':memory:' value shouldn't interfere with transaction support detection." % option - # Transaction support should be properly initialised for the 'other' DB + # Transaction support should be properly initialized for the 'other' DB self.assertTrue(other.features.supports_transactions, msg) # And all the DBs should report that they support transactions self.assertTrue(connections_support_transactions(), msg) diff --git a/tests/transactions_regress/tests.py b/tests/transactions_regress/tests.py index 1f9f291307..e3cc2bc73c 100644 --- a/tests/transactions_regress/tests.py +++ b/tests/transactions_regress/tests.py @@ -199,7 +199,7 @@ class TestTransactionClosing(IgnoreDeprecationWarningsMixin, TransactionTestCase "Cannot establish two connections to an in-memory SQLite database.") class TestNewConnection(IgnoreDeprecationWarningsMixin, TransactionTestCase): """ - Check that new connections don't have special behaviour. + Check that new connections don't have special behavior. """ available_apps = ['transactions_regress'] diff --git a/tests/view_tests/generic_urls.py b/tests/view_tests/generic_urls.py index a228290424..4d6a2219ec 100644 --- a/tests/view_tests/generic_urls.py +++ b/tests/view_tests/generic_urls.py @@ -35,7 +35,7 @@ urlpatterns = patterns('', url('^中文/target/$', 'view_tests.views.index_page'), ) -# rediriects, both temporary and permanent, with non-ASCII targets +# redirects, both temporary and permanent, with non-ASCII targets urlpatterns += patterns('', ('^nonascii_redirect/$', RedirectView.as_view( url='/中文/target/', permanent=False)),