mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #28653 -- Added missing ForeignKey.on_delete argument in docs.
This commit is contained in:
committed by
Tim Graham
parent
3fa0a824c2
commit
08c8c3ead9
@@ -1064,7 +1064,7 @@ fields. Suppose we have an additional model to the example above::
|
||||
|
||||
class Restaurant(models.Model):
|
||||
pizzas = models.ManyToManyField(Pizza, related_name='restaurants')
|
||||
best_pizza = models.ForeignKey(Pizza, related_name='championed_by')
|
||||
best_pizza = models.ForeignKey(Pizza, related_name='championed_by', on_delete=models.CASCADE)
|
||||
|
||||
The following are all legal:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user