wsvincent / djangoforprofessionals

Source code for Django for Professionals 4.0
https://djangoforprofessionals.com/
MIT License
637 stars 264 forks source link

Chapter 11: Foreign Keys #152

Closed MrigankShekhar2 closed 2 years ago

MrigankShekhar2 commented 2 years ago

A one-to-many relationship is far more common and is the default foreign key setting within Django. For example, one student can sign up for many classes.

Is that example one-to-many or many-to-many? Because a class may belong to more than one student.

wsvincent commented 2 years ago

Hi @MrigankShekhar2 ,

Good pt. It really depends how you configure your models but that example could be improved to be less confusing. Working on that now for the 4.0 update.

Cheers,

Will