Ticket #9029: 9029-get_or_create-r9014.diff
File 9029-get_or_create-r9014.diff, 525 bytes (added by , 16 years ago) |
---|
-
tests/regressiontests/get_or_create_regress/models.py
38 38 >>> p.books.count() 39 39 1 40 40 41 # Use the publisher's primary key instead of a model instance. 42 >>> Book.objects.get_or_create(publisher_id=p.id, name='The Book of Ed & Fred 2') 43 <Book: Book object>, True 44 41 45 # 42 46 # ManyRelatedManager 43 47 #