diff --git a/tests/modeltests/model_formsets/models.py b/tests/modeltests/model_formsets/models.py index 5c62885be5b48..1644ddf37b0f8 100644 --- a/tests/modeltests/model_formsets/models.py +++ b/tests/modeltests/model_formsets/models.py @@ -512,7 +512,7 @@ def __unicode__(self): ... 'book_set-INITIAL_FORMS': '1', # the number of forms with initial data ... 'book_set-0-id': '1', ... 'book_set-0-title': 'Les Fleurs du Mal', -... 'book_set-1-title': 'Le Spleen de Paris', +... 'book_set-1-title': 'Les Paradis Artificiels', ... 'book_set-2-title': '', ... } @@ -521,14 +521,14 @@ def __unicode__(self): True >>> formset.save() -[] +[] -As you can see, 'Le Spleen de Paris' is now a book belonging to Charles Baudelaire. +As you can see, 'Les Paradis Artificiels' is now a book belonging to Charles Baudelaire. >>> for book in author.book_set.order_by('id'): ... print book.title Les Fleurs du Mal -Le Spleen de Paris +Les Paradis Artificiels The save_as_new parameter lets you re-associate the data to a new instance. This is used in the admin for save_as functionality. @@ -539,7 +539,7 @@ def __unicode__(self): ... 'book_set-0-id': '1', ... 'book_set-0-title': 'Les Fleurs du Mal', ... 'book_set-1-id': '2', -... 'book_set-1-title': 'Le Spleen de Paris', +... 'book_set-1-title': 'Les Paradis Artificiels', ... 'book_set-2-title': '', ... } @@ -550,7 +550,7 @@ def __unicode__(self): >>> new_author = Author.objects.create(name='Charles Baudelaire') >>> formset = AuthorBooksFormSet(data, instance=new_author, save_as_new=True) >>> [book for book in formset.save() if book.author.pk == new_author.pk] -[, ] +[, ] Test using a custom prefix on an inline formset. @@ -650,8 +650,8 @@ def __unicode__(self): >>> formset = AuthorBooksFormSet(instance=author, queryset=custom_qs) >>> for form in formset.forms: ... print form.as_p() -

-

+

+

@@ -662,7 +662,7 @@ def __unicode__(self): ... 'book_set-0-id': '1', ... 'book_set-0-title': 'Les Fleurs du Mal', ... 'book_set-1-id': '2', -... 'book_set-1-title': 'Le Spleen de Paris', +... 'book_set-1-title': 'Les Paradis Artificiels', ... 'book_set-2-id': '5', ... 'book_set-2-title': 'Flowers of Evil', ... 'book_set-3-title': 'Revue des deux mondes',