diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py index 1087cf8795..7ded82bb7c 100644 --- a/tests/modeltests/model_forms/models.py +++ b/tests/modeltests/model_forms/models.py @@ -554,7 +554,7 @@ fields with the 'choices' attribute are represented by a ChoiceField. -
Hold down "Control", or "Command" on a Mac, to select more than one. +
Hold down "Control", or "Command" on a Mac, to select more than one. You can restrict a form to a subset of the complete list of fields by providing a 'fields' argument. If you try to save a @@ -579,7 +579,7 @@ inserted as 'initial' data in each Field. ... model = Writer >>> f = RoykoForm(auto_id=False, instance=w) >>> print f -Name:
Use both first and last names. +Name:
Use both first and last names. >>> art = Article(headline='Test article', slug='test-article', pub_date=datetime.date(1988, 1, 4), writer=w, article='Hello.') >>> art.save() @@ -609,7 +609,7 @@ inserted as 'initial' data in each Field. - Hold down "Control", or "Command" on a Mac, to select more than one. + Hold down "Control", or "Command" on a Mac, to select more than one. >>> f = TestArticleForm({'headline': u'Test headline', 'slug': 'test-headline', 'pub_date': u'1984-02-06', 'writer': unicode(w_royko.pk), 'article': 'Hello.'}, instance=art) >>> f.errors {} @@ -672,7 +672,7 @@ Add some categories and test the many-to-many form output. - Hold down "Control", or "Command" on a Mac, to select more than one. + Hold down "Control", or "Command" on a Mac, to select more than one. Initial values can be provided for model forms >>> f = TestArticleForm(auto_id=False, initial={'headline': 'Your headline here', 'categories': ['1','2']}) @@ -696,7 +696,7 @@ Initial values can be provided for model forms - Hold down "Control", or "Command" on a Mac, to select more than one. + Hold down "Control", or "Command" on a Mac, to select more than one. >>> f = TestArticleForm({'headline': u'New headline', 'slug': u'new-headline', 'pub_date': u'1988-01-04', ... 'writer': unicode(w_royko.pk), 'article': u'Hello.', 'categories': [u'1', u'2']}, instance=new_art) @@ -812,7 +812,7 @@ the data in the database when the form is instantiated. - Hold down "Control", or "Command" on a Mac, to select more than one. + Hold down "Control", or "Command" on a Mac, to select more than one. >>> Category.objects.create(name='Fourth', url='4th') >>> Writer.objects.create(name='Carl Bernstein') @@ -839,7 +839,7 @@ the data in the database when the form is instantiated. - Hold down "Control", or "Command" on a Mac, to select more than one. + Hold down "Control", or "Command" on a Mac, to select more than one. # ModelChoiceField ############################################################ diff --git a/tests/regressiontests/forms/forms.py b/tests/regressiontests/forms/forms.py index 85eced26ad..9e45a267db 100644 --- a/tests/regressiontests/forms/forms.py +++ b/tests/regressiontests/forms/forms.py @@ -1258,20 +1258,20 @@ to a Field class. This help text is displayed when a Form is rendered. ... password = CharField(widget=PasswordInput, help_text='Choose wisely.') >>> p = UserRegistration(auto_id=False) >>> print p.as_ul() -
  • Username: e.g., user@example.com
  • -
  • Password: Choose wisely.
  • +
  • Username: e.g., user@example.com
  • +
  • Password: Choose wisely.
  • >>> print p.as_p() -

    Username: e.g., user@example.com

    -

    Password: Choose wisely.

    +

    Username: e.g., user@example.com

    +

    Password: Choose wisely.

    >>> print p.as_table() -Username:
    e.g., user@example.com -Password:
    Choose wisely. +Username:
    e.g., user@example.com +Password:
    Choose wisely. The help text is displayed whether or not data is provided for the form. >>> p = UserRegistration({'username': u'foo'}, auto_id=False) >>> print p.as_ul() -
  • Username: e.g., user@example.com
  • -
  • Password: Choose wisely.
  • +
  • Username: e.g., user@example.com
  • +
  • Password: Choose wisely.
  • help_text is not displayed for hidden fields. It can be used for documentation purposes, though. @@ -1281,7 +1281,7 @@ purposes, though. ... next = CharField(widget=HiddenInput, initial='/', help_text='Redirect destination') >>> p = UserRegistration(auto_id=False) >>> print p.as_ul() -
  • Username: e.g., user@example.com
  • +
  • Username: e.g., user@example.com
  • Password:
  • Help text can include arbitrary Unicode characters. @@ -1289,7 +1289,7 @@ Help text can include arbitrary Unicode characters. ... username = CharField(max_length=10, help_text='ŠĐĆŽćžšđ') >>> p = UserRegistration(auto_id=False) >>> p.as_ul() -u'
  • Username: \u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111
  • ' +u'
  • Username: \u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111
  • ' # Subclassing forms ########################################################### diff --git a/tests/regressiontests/model_forms_regress/tests.py b/tests/regressiontests/model_forms_regress/tests.py index 2e77a88977..5bee73ce7e 100644 --- a/tests/regressiontests/model_forms_regress/tests.py +++ b/tests/regressiontests/model_forms_regress/tests.py @@ -129,7 +129,7 @@ class ManyToManyCallableInitialTests(TestCase): - Hold down "Control", or "Command" on a Mac, to select more than one.""") + Hold down "Control", or "Command" on a Mac, to select more than one.""") class CFFForm(forms.ModelForm): class Meta: