Changeset 7622 for django/trunk/tests/modeltests/many_to_many/models.py
- Timestamp:
- 06/11/08 23:13:16 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/modeltests/many_to_many/models.py
r7477 r7622 40 40 # Create an Article. 41 41 >>> a1 = Article(id=None, headline='Django lets you build Web apps easily') 42 43 # You can't associate it with a Publication until it's been saved. 44 >>> a1.publications.add(p1) 45 Traceback (most recent call last): 46 ... 47 ValueError: 'Article' instance needs to have a primary key value before a many-to-many relationship can be used. 48 49 # Save it! 42 50 >>> a1.save() 43 51
