From 138c4aaa7773e885c75365dac217097781d159b9 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 4 Mar 2011 00:42:37 +0000 Subject: [PATCH] [1.2.X] Fixed #15550 -- Corrected an ordering dependency in the model_forms doctests. Thanks to bberes for the report. Backport of r15745 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15748 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/model_forms/models.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py index d3a08ca760..f2f30d5d51 100644 --- a/tests/modeltests/model_forms/models.py +++ b/tests/modeltests/model_forms/models.py @@ -39,6 +39,9 @@ class Category(models.Model): class Writer(models.Model): name = models.CharField(max_length=50, help_text='Use both first and last names.') + class Meta: + ordering = ('name',) + def __unicode__(self): return self.name @@ -546,8 +549,8 @@ fields with the 'choices' attribute are represented by a ChoiceField. Pub date: Writer: Article: Status:
  • Writer:
  • Article:
  • Status:
  • Writer:
  • Article:
  • Status:
  • Writer:
  • Article:
  • Status:
  • Writer:
  • Article:
  • Status:
  • Writer:
  • Article:
  • Status: - +

    @@ -1073,10 +1076,10 @@ True >>> print form.as_p()