0
0
mirror of https://github.com/django/django.git synced 2024-11-24 20:07:01 +01:00

Made the direction of relationship clearer.

This commit is contained in:
GappleBee 2024-11-10 11:20:31 +00:00
parent 0a02e4e3c4
commit 4fcf7ff75a

View File

@ -155,11 +155,11 @@ this case, we've set the :attr:`~django.db.models.Field.default` value of
``votes`` to 0.
Finally, note that a :class:`~django.db.models.ForeignKey` defines a
relationship between models. This creates a one-to-many relationship, where
a ``Question`` can have multiple related ``Choice`` instances. Django supports
relationship between models. This creates a many-to-one relationship, where
each ``Choice`` points to a single ``Question``, but a ``Question`` can have
multiple ``Choice`` instances pointing to it. Django supports
all the common database relationships: many-to-one, many-to-many, and
one-to-one.
relationships: many-to-one, many-to-many, and one-to-one.
Activating models
=================