summaryrefslogtreecommitdiff
path: root/django/db/models
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2014-03-02 15:25:53 +0100
committerTim Graham <timograham@gmail.com>2014-03-03 07:38:09 -0500
commit0d912258921a442c48d5787228db2db5af7e8fa5 (patch)
treef6826425de5bca2498c46e5242b870282a34eda2 /django/db/models
parent6acaa5238668593d6d854b28dbfa65e95796585c (diff)
Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
Diffstat (limited to 'django/db/models')
-rw-r--r--django/db/models/deletion.py4
-rw-r--r--django/db/models/fields/__init__.py4
-rw-r--r--django/db/models/query.py10
-rw-r--r--django/db/models/query_utils.py2
-rw-r--r--django/db/models/related.py2
-rw-r--r--django/db/models/sql/compiler.py2
-rw-r--r--django/db/models/sql/query.py4
7 files changed, 14 insertions, 14 deletions
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: