#29591: ManyToManyField examples are confused about how many Publication objects
there are
--------------------------------------------+------------------------
               Reporter:  Marnanel Thurman  |          Owner:  nobody
                   Type:  Bug               |         Status:  new
              Component:  Documentation     |        Version:  2.0
               Severity:  Normal            |       Keywords:
           Triage Stage:  Unreviewed        |      Has patch:  0
    Needs documentation:  0                 |    Needs tests:  0
Patch needs improvement:  0                 |  Easy pickings:  0
                  UI/UX:  0                 |
--------------------------------------------+------------------------
 In https://docs.djangoproject.com/en/2.0/topics/db/examples/many_to_many/
 , the text says there are two Publication objects ("a couple" and "both"),
 but the code example creates three, and uses three.

 Create a couple of Publications:

 >>> p1 = Publication(title='The Python Journal')
 >>> p1.save()
 >>> p2 = Publication(title='Science News')
 >>> p2.save()
 >>> p3 = Publication(title='Science Weekly')
 >>> p3.save()

 [...]

 Create another Article, and set it to appear in both Publications:

 >>> a2 = Article(headline='NASA uses Python')
 >>> a2.save()
 >>> a2.publications.add(p1, p2)
 >>> a2.publications.add(p3)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29591>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.84d21f64eb4d2ad44eb8ff31958c9de5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to