summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/querysets.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index c9f3556f10..4b22def946 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -1074,7 +1074,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: