InterviewSolution
Saved Bookmarks
| 1. |
Difference between Django OneToOneField and ForeignKey Field? |
|
Answer» Both of them are of the most common types of fields USED in Django. The only difference between these two is that ForeignKey field consists of on_delete option along with a MODEL’s class because it’s used for many-to-one RELATIONSHIPS while on the other HAND, the OneToOneField, only carries out a one-to-one relationship and requires only the model’s class. |
|