Code

Ticket #11864: 11864-revised.diff

File 11864-revised.diff, 1.7 KB (added by dwillis, 3 years ago)
Line 
1From 28e78f64e4fa15e7a7540e930e49dfc0e469ffc1 Mon Sep 17 00:00:00 2001
2From: Derek Willis <dwillis@gmail.com>
3Date: Sat, 19 Feb 2011 16:36:12 -0500
4Subject: [PATCH] model Relationship backreference
5
6---
7 docs/topics/db/models.txt |   15 ++++++++++-----
8 1 files changed, 10 insertions(+), 5 deletions(-)
9
10diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
11index 7bc2e09..48ef5d7 100644
12--- a/docs/topics/db/models.txt
13+++ b/docs/topics/db/models.txt
14@@ -320,12 +320,17 @@ whatever you want. For example::
15 
16     See the `Many-to-one relationship model example`_ for a full example.
17 
18-.. _Many-to-one relationship model example: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/many_to_one/models.py
19+    .. _Many-to-one relationship model example: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/many_to_one/models.py
20 
21-:class:`~django.db.models.ForeignKey` fields also accept a number of extra
22-arguments which are explained in :ref:`the model field reference
23-<foreign-key-arguments>`. These options help define how the relationship should
24-work; all are optional.
25+    :class:`~django.db.models.ForeignKey` fields also accept a number of extra
26+    arguments which are explained in :ref:`the model field reference
27+    <foreign-key-arguments>`. These options help define how the relationship should
28+    work; all are optional.
29+
30+    See the `Following relationships backward example`_ for more details on accessing backwards
31+    related objects.
32+
33+    .. _Following relationships backward example: http://docs.djangoproject.com/en/dev/topics/db/queries/#backwards-related-objects
34 
35 Many-to-many relationships
36 ~~~~~~~~~~~~~~~~~~~~~~~~~~
37--
381.6.5.7
39