1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #32372 -- Made examples in related objects reference docs consistent.

This commit is contained in:
Jack Aitken 2021-01-21 21:04:39 -05:00 committed by Mariusz Felisiak
parent a03a36121d
commit 725c549ae7

View File

@ -14,12 +14,12 @@ Related objects reference
from django.db import models
class Reporter(models.Model):
class Blog(models.Model):
# ...
pass
class Article(models.Model):
reporter = models.ForeignKey(Reporter, on_delete=models.CASCADE)
class Entry(models.Model):
blog = models.ForeignKey(Blog, on_delete=models.CASCADE, null=True)
In the above example, the methods below will be available on
the manager ``reporter.article_set``.