Ticket #20183: 1171.diff

File 1171.diff, 740 bytes (added by tadeck, 11 years ago)

DIFF for fix in ticket #20183 (pull request no. 1171)

  • docs/topics/db/queries.txt

    diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt
    index a1cb5c7..39ef2b3 100644
    a b Saving ``ForeignKey`` and ``ManyToManyField`` fields  
    102102Updating a :class:`~django.db.models.ForeignKey` field works exactly the same
    103103way as saving a normal field -- simply assign an object of the right type to
    104104the field in question. This example updates the ``blog`` attribute of an
    105 ``Entry`` instance ``entry``::
     105``Entry`` instance ``entry``, assuming appropriate instances of ``Entry`` and
     106``Blog`` are already saved to the database (so we can retrieve them below)::
    106107
    107108    >>> from blog.models import Entry
    108109    >>> entry = Entry.objects.get(pk=1)
Back to Top