summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/admin/options.py10
-rw-r--r--django/core/management/commands/inspectdb.py2
-rw-r--r--django/db/models/fields/related.py2
-rw-r--r--django/forms/models.py2
-rw-r--r--docs/howto/custom-model-fields.txt2
5 files changed, 9 insertions, 9 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 5fc0f26e60..192d28add6 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -1695,9 +1695,9 @@ class InlineModelAdmin(BaseModelAdmin):
"""
Options for inline editing of ``model`` instances.
- Provide ``name`` to specify the attribute name of the ``ForeignKey`` from
- ``model`` to its parent. This is required if ``model`` has more than one
- ``ForeignKey`` to its parent.
+ Provide ``fk_name`` to specify the attribute name of the ``ForeignKey``
+ from ``model`` to its parent. This is required if ``model`` has more than
+ one ``ForeignKey`` to its parent.
"""
model = None
fk_name = None
@@ -1759,8 +1759,8 @@ class InlineModelAdmin(BaseModelAdmin):
# Take the custom ModelForm's Meta.exclude into account only if the
# InlineModelAdmin doesn't define its own.
exclude.extend(self.form._meta.exclude)
- # if exclude is an empty list we use None, since that's the actual
- # default
+ # If exclude is an empty list we use None, since that's the actual
+ # default.
exclude = exclude or None
can_delete = self.can_delete and self.has_delete_permission(request, obj)
defaults = {
diff --git a/django/core/management/commands/inspectdb.py b/django/core/management/commands/inspectdb.py
index 52e75c21de..30389eb839 100644
--- a/django/core/management/commands/inspectdb.py
+++ b/django/core/management/commands/inspectdb.py
@@ -211,7 +211,7 @@ class Command(NoArgsCommand):
field_type = 'TextField'
field_notes.append('This field type is a guess.')
- # This is a hook for DATA_TYPES_REVERSE to return a tuple of
+ # This is a hook for data_types_reverse to return a tuple of
# (field_type, field_params_dict).
if type(field_type) is tuple:
field_type, new_params = field_type
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 764a577c3b..78815c2420 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -2120,7 +2120,7 @@ class ManyToManyField(RelatedField):
def _get_path_info(self, direct=False):
"""
- Called by both direct an indirect m2m traversal.
+ Called by both direct and indirect m2m traversal.
"""
pathinfos = []
int_model = self.rel.through
diff --git a/django/forms/models.py b/django/forms/models.py
index c53f844400..effdd78238 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -931,7 +931,7 @@ def _get_foreign_key(parent_model, model, fk_name=None, can_fail=False):
"""
Finds and returns the ForeignKey from model to parent if there is one
(returns None if can_fail is True and no such field exists). If fk_name is
- provided, assume it is the name of the ForeignKey field. Unles can_fail is
+ provided, assume it is the name of the ForeignKey field. Unless can_fail is
True, an exception is raised if there is no ForeignKey from model to
parent_model.
"""
diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt
index 0d3901bd40..4d06634856 100644
--- a/docs/howto/custom-model-fields.txt
+++ b/docs/howto/custom-model-fields.txt
@@ -795,7 +795,7 @@ storing a string.
If :meth:`.get_internal_type` returns a string that is not known to Django for
the database backend you are using -- that is, it doesn't appear in
-``django.db.backends.<db_name>.creation.DATA_TYPES`` -- the string will still be
+``django.db.backends.<db_name>.creation.data_types`` -- the string will still be
used by the serializer, but the default :meth:`.db_type` method will return
``None``. See the documentation of :meth:`.db_type` for reasons why this might be
useful. Putting a descriptive string in as the type of the field for the