Commit b6bfdacd authored by Daniel Hahler's avatar Daniel Hahler Committed by Tim Graham
Browse files

[1.6.x] Fixed various minor doc typos / references.

Backport of 67f9f385 from master
parent 890a2d63
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1547,9 +1547,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
@@ -1607,8 +1607,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 = {
+1 −1
Original line number Diff line number Diff line
@@ -202,7 +202,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
+1 −1
Original line number Diff line number Diff line
@@ -1386,7 +1386,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
+1 −1
Original line number Diff line number Diff line
@@ -909,7 +909,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.
    """
+1 −1
Original line number Diff line number Diff line
@@ -691,7 +691,7 @@ and other SQL commands create the right column type for 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