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 ea2a3ef060..214e18b376 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -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: