Establish a one to many relationship in models of Django2 using ForeignKey ():
1 student = models.ForeignKey("Classes")
1 TypeError: __init__() missing 1 required positional argument: 'on_delete'
1 student = models.ForeignKey("Classes",on_delete=models.CASCADE)
It’s OK with on_delete=models.CASCADE.
This is the reason why Django2.0 has been updated over the previous 1.8 editions, and the on_delet parameter must be added to Django2.0.