From ff05de760cc4ef4c7f188e163c722ec3bc1f0cbf Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 20 Jan 2018 23:09:10 -0800 Subject: Fixed #29038 -- Removed closing slash from HTML void tags. --- docs/ref/forms/api.txt | 222 ++++++++++++++++++++++----------------------- docs/ref/forms/fields.txt | 50 +++++----- docs/ref/forms/widgets.txt | 34 +++---- 3 files changed, 153 insertions(+), 153 deletions(-) (limited to 'docs/ref/forms') diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt index 5e001a2f62..bafa688f98 100644 --- a/docs/ref/forms/api.txt +++ b/docs/ref/forms/api.txt @@ -255,9 +255,9 @@ precedence:: ... comment = forms.CharField() >>> f = CommentForm(initial={'name': 'instance'}, auto_id=False) >>> print(f) - Name: - Url: - Comment: + Name: + Url: + Comment: .. method:: Form.get_initial_for_field(field, field_name) @@ -322,10 +322,10 @@ You can alter the field of :class:`Form` instance to change the way it is presented in the form:: >>> f.as_table().split('\n')[0] - 'Name:' + 'Name:' >>> f.fields['name'].label = "Username" >>> f.as_table().split('\n')[0] - 'Username:' + 'Username:' Beware not to alter the ``base_fields`` attribute because this modification will influence all subsequent ``ContactForm`` instances within the same Python @@ -334,7 +334,7 @@ process:: >>> f.base_fields['name'].label = "Username" >>> another_f = CommentForm(auto_id=False) >>> another_f.as_table().split('\n')[0] - 'Username:' + 'Username:' Accessing "clean" data ====================== @@ -438,10 +438,10 @@ simply ``print`` it:: >>> f = ContactForm() >>> print(f) - - - - + + + + If the form is bound to data, the HTML output will include that data appropriately. For example, if a field is represented by an @@ -455,10 +455,10 @@ include ``checked`` if appropriate:: ... 'cc_myself': True} >>> f = ContactForm(data) >>> print(f) - - - - + + + + This default output is a two-column HTML table, with a ```` for each field. Notice the following: @@ -506,12 +506,12 @@ containing one field:: >>> f = ContactForm() >>> f.as_p() - '

\n

\n

\n

' + '

\n

\n

\n

' >>> print(f.as_p()) -

-

-

-

+

+

+

+

``as_ul()`` ----------- @@ -525,12 +525,12 @@ flexibility:: >>> f = ContactForm() >>> f.as_ul() - '
  • \n
  • \n
  • \n
  • ' + '
  • \n
  • \n
  • \n
  • ' >>> print(f.as_ul()) -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • ``as_table()`` -------------- @@ -543,12 +543,12 @@ it calls its ``as_table()`` method behind the scenes:: >>> f = ContactForm() >>> f.as_table() - '\n\n\n' + '\n\n\n' >>> print(f) - - - - + + + + .. _ref-forms-api-styling-form-rows: @@ -618,20 +618,20 @@ tags nor ``id`` attributes:: >>> f = ContactForm(auto_id=False) >>> print(f.as_table()) - Subject: - Message: - Sender: - Cc myself: + Subject: + Message: + Sender: + Cc myself: >>> print(f.as_ul()) -
  • Subject:
  • -
  • Message:
  • -
  • Sender:
  • -
  • Cc myself:
  • +
  • Subject:
  • +
  • Message:
  • +
  • Sender:
  • +
  • Cc myself:
  • >>> print(f.as_p()) -

    Subject:

    -

    Message:

    -

    Sender:

    -

    Cc myself:

    +

    Subject:

    +

    Message:

    +

    Sender:

    +

    Cc myself:

    If ``auto_id`` is set to ``True``, then the form output *will* include ``