Skip to content

Commit

Permalink
[3.1.x] Fixed #32372 -- Made examples in related objects reference do…
Browse files Browse the repository at this point in the history
…cs consistent.

Backport of 725c549 from master
  • Loading branch information
jackaitken authored and felixxm committed Jan 22, 2021
1 parent 2a74248 commit cc5ee23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/ref/models/relations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down

0 comments on commit cc5ee23

Please sign in to comment.