-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Becoming an Enterprise Django Developer
By :

Django provides three relationship types for linking tables:
A many-to-one relationship is defined by using a ForeignKey
field, and the other two relationship types are defined using the self-explanatory ManyToManyField
and OneToOneField
. These fields are named appropriately after the relationship type that they represent.
Next, we will discuss the key components of working with model field relationships.
The three field types, ForeignKey
, ManyToManyField
, and OneToOneField
, all accept the standard default
, blank
, and verbose_name
field arguments that other field types accept. The null
argument will have no effect on a ManyToManyField
and will only apply to the ForeignKey
and OneToOneField
types. Two of these field types—ForeignKey
and OneToOneField
—require at least two positional arguments, the first being...