mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Made the direction of relationship clearer.
This commit is contained in:
@@ -155,11 +155,11 @@ this case, we've set the :attr:`~django.db.models.Field.default` value of
|
|||||||
``votes`` to 0.
|
``votes`` to 0.
|
||||||
|
|
||||||
Finally, note that a :class:`~django.db.models.ForeignKey` defines a
|
Finally, note that a :class:`~django.db.models.ForeignKey` defines a
|
||||||
relationship between models. This creates a one-to-many relationship, where
|
relationship between models. This creates a many-to-one relationship, where
|
||||||
a ``Question`` can have multiple related ``Choice`` instances. Django supports
|
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
|
all the common database relationships: many-to-one, many-to-many, and
|
||||||
one-to-one.
|
one-to-one.
|
||||||
relationships: many-to-one, many-to-many, and one-to-one.
|
|
||||||
|
|
||||||
Activating models
|
Activating models
|
||||||
=================
|
=================
|
||||||
|
|||||||
Reference in New Issue
Block a user