Fixed #32372 -- Made examples in related objects reference docs consistent.
This commit is contained in:
parent
a03a36121d
commit
725c549ae7
|
@ -14,12 +14,12 @@ Related objects reference
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
class Reporter(models.Model):
|
class Blog(models.Model):
|
||||||
# ...
|
# ...
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class Article(models.Model):
|
class Entry(models.Model):
|
||||||
reporter = models.ForeignKey(Reporter, on_delete=models.CASCADE)
|
blog = models.ForeignKey(Blog, on_delete=models.CASCADE, null=True)
|
||||||
|
|
||||||
In the above example, the methods below will be available on
|
In the above example, the methods below will be available on
|
||||||
the manager ``reporter.article_set``.
|
the manager ``reporter.article_set``.
|
||||||
|
|
Loading…
Reference in New Issue