Ticket #15932: 15932-docs-2.diff

File 15932-docs-2.diff, 1.3 KB (added by Claude Paroz, 12 years ago)

Fixed docs as of comment:7

  • docs/ref/models/fields.txt

    diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
    index 23dcf4b..ebd9704 100644
    a b define the details of how the relation works.  
    10031003    :ref:`some special syntax <abstract-related-name>` is available.
    10041004
    10051005    If you'd prefer Django didn't create a backwards relation, set ``related_name``
    1006     to ``'+'``. For example, this will ensure that the ``User`` model won't get a
    1007     backwards relation to this model::
     1006    to ``'+'`` or end it with ``'+'``. For example, this will ensure that the
     1007    ``User`` model won't get a backwards relation to this model::
    10081008
    10091009        user = models.ForeignKey(User, related_name='+')
    10101010
    that control how the relationship functions.  
    10961096
    10971097    Same as :attr:`ForeignKey.related_name`.
    10981098
     1099    If you have more than one ``related_name`` attribute for a
     1100    ``ManyToManyField`` pointing to the same model, you have to set them to
     1101    different values each ended with ``'+'`` if you want to suppress the
     1102    backwards relations::
     1103
     1104        users = models.ManyToManyField(User, related_name='u+')
     1105        referents = models.ManyToManyField(User, related_name='ref+')
     1106
    10991107.. attribute:: ManyToManyField.limit_choices_to
    11001108
    11011109    Same as :attr:`ForeignKey.limit_choices_to`.
Back to Top