diff --git a/docs/topics/db/examples/many_to_one.txt b/docs/topics/db/examples/many_to_one.txt index 4ff80e07a9..8a77d89d6d 100644 --- a/docs/topics/db/examples/many_to_one.txt +++ b/docs/topics/db/examples/many_to_one.txt @@ -74,10 +74,9 @@ Create an Article via the Reporter object:: >>> new_article.reporter.id 1 -Create a new article, and add it to the article set:: +Create a new article:: - >>> new_article2 = Article.objects.create(headline="Paul's story", pub_date=date(2006, 1, 17)) - >>> r.article_set.add(new_article2) + >>> new_article2 = Article.objects.create(headline="Paul's story", pub_date=date(2006, 1, 17), reporter=r) >>> new_article2.reporter >>> new_article2.reporter.id