Fixed #28653 -- Added missing ForeignKey.on_delete argument in docs.

This commit is contained in:
Stefan Schneider 2017-09-29 17:38:28 +02:00 committed by Tim Graham
parent 3fa0a824c2
commit 08c8c3ead9
4 changed files with 4 additions and 4 deletions

View file

@ -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: