1p1 = Publication(title='The Python Journal')
2p1.save()
3a1 = Article(headline='Django lets you build Web apps easily')
4a1.save()
5
6a1.publications.add(p1)
7
8# Adding a second time is OK, it will not duplicate the relation:
9a1.publications.add(p1)