From acd296bb9c78c410054b80bbf96e67025ed14135 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 4 Mar 2011 00:27:22 +0000 Subject: [PATCH] Fixed #15550 -- Corrected an ordering dependency in the model_forms doctests. Thanks to bberes for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15745 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 2e820a6779..d4c915344f 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()