summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-27 01:18:18 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-27 01:18:18 +0000
commitaee55ce5249fdc822d6bd4ec5238a3154a217dcb (patch)
treee102933058ff42b8b5319312530d5020280a6c93
parent103d484807050c00d02641aa04670cea8d0e68a4 (diff)
Changed one of the model_formsets tests to be immune to the differences in the
natural collation ordering used by different databases (normally, this test would fail on PostgreSQL, but not because the code was incorrect). This is purely a test tweak. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/modeltests/model_formsets/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/modeltests/model_formsets/models.py b/tests/modeltests/model_formsets/models.py
index a8b0cdde5b..c8d5c4bc42 100644
--- a/tests/modeltests/model_formsets/models.py
+++ b/tests/modeltests/model_formsets/models.py
@@ -20,7 +20,7 @@ class AuthorMeeting(models.Model):
name = models.CharField(max_length=100)
authors = models.ManyToManyField(Author)
created = models.DateField(editable=False)
-
+
def __unicode__(self):
return self.name
@@ -289,10 +289,10 @@ True
As you can see, 'Le Spleen de Paris' is now a book belonging to Charles Baudelaire.
->>> for book in author.book_set.order_by('title'):
+>>> for book in author.book_set.order_by('id'):
... print book.title
-Le Spleen de Paris
Les Fleurs du Mal
+Le Spleen de Paris
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.