#35889: Incorrect reference of defaults widgets in "Styling widget instances" 
docs
--------------------------------------+------------------------------------
     Reporter:  Antoliny              |                    Owner:  Antoliny
         Type:  Cleanup/optimization  |                   Status:  assigned
    Component:  Documentation         |                  Version:  5.0
     Severity:  Normal                |               Resolution:
     Keywords:  Widget Document       |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

 * stage:  Unreviewed => Accepted
 * summary:
     Django widgets document customizing widget instances section incorrect
     sentence.
     =>
     Incorrect reference of defaults widgets in "Styling widget instances"
     docs

Comment:

 Thank you for spotting!
 It looks like this was true when this was first written

 I would suggest something like...
 {{{#!diff
 diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt
 index dd2ba0ac4c..950a852209 100644
 --- a/docs/ref/forms/widgets.txt
 +++ b/docs/ref/forms/widgets.txt
 @@ -142,9 +142,9 @@ For example, take the following form::
          url = forms.URLField()
          comment = forms.CharField()

 -This form will include three default :class:`TextInput` widgets, with
 default
 -rendering -- no CSS class, no extra attributes. This means that the input
 boxes
 -provided for each widget will be rendered exactly the same:
 +This form will include :class:`TextInput` widgets for the name and
 comment
 +fields, and a :class:`URLInput` widget for the url field. Each with
 default
 +rendering - no CSS class, no extra attributes:

  .. code-block:: pycon

 @@ -154,11 +154,11 @@ provided for each widget will be rendered exactly
 the same:
      <div>Url:<input type="url" name="url" required></div>
      <div>Comment:<input type="text" name="comment" required></div>

 -On a real web page, you probably don't want every widget to look the
 same. You
 -might want a larger input element for the comment, and you might want the
 -'name' widget to have some special CSS class. It is also possible to
 specify
 -the 'type' attribute to take advantage of the new HTML5 input types.  To
 do
 -this, you use the :attr:`Widget.attrs` argument when creating the
 widget::
 +On a real web page, you probably want to customize this. You might want a
 +larger input element for the comment, and you might want the 'name'
 widget to
 +have some special CSS class. It is also possible to specify the 'type'
 +attribute to use HTML5 input types. To do this, you use the
 +:attr:`Widget.attrs` argument when creating the widget::

      class CommentForm(forms.Form):
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35889#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701930085b216-b6b51309-1036-4af6-a2ff-f9e253bafaad-000000%40eu-central-1.amazonses.com.

Reply via email to