[4.1.x] Described Article-Reporter relationship in many-to-one topic.

Backport of 8e93fc561e from main
This commit is contained in:
Pamela Fox 2022-09-14 11:32:56 -07:00 committed by Mariusz Felisiak
parent be5e3b46f7
commit 05ace24d82
1 changed files with 4 additions and 1 deletions

View File

@ -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