diff options
| author | Pamela Fox <pamela.fox@gmail.com> | 2022-09-14 11:32:56 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-09-15 10:15:50 +0200 |
| commit | 8e93fc561e4ead282abe2a12bd6ac393c9d308be (patch) | |
| tree | 8526440fa22e0277b828298253aa41eac2bd0360 /docs | |
| parent | 6220c445c40a6a7f4d442de8bde2628346153963 (diff) | |
Described Article-Reporter relationship in many-to-one topic.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/examples/many_to_one.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/topics/db/examples/many_to_one.txt b/docs/topics/db/examples/many_to_one.txt index bb4202ab66..e91f7e8a11 100644 --- a/docs/topics/db/examples/many_to_one.txt +++ b/docs/topics/db/examples/many_to_one.txt @@ -2,7 +2,10 @@ Many-to-one relationships ========================= -To define a many-to-one relationship, use :class:`~django.db.models.ForeignKey`:: +To define a many-to-one relationship, use :class:`~django.db.models.ForeignKey`. + +In this example, a ``Reporter`` can be associated with many ``Article`` +objects, but an ``Article`` can only have one ``Reporter`` object:: from django.db import models |
